Schema overwriting is global.
What you could do is create a new adapter class that inherits from the LLBLGen generated adapter. Here I've called it DMAdapter.
In the CustomConnectionString function, you can use the dotnet 2.0 SqlConnectionStringBuilder (or roll your own) to modify the connection string on the fly.
base.ConnectionString will contain the connection string that LLBLGen obtained from the config file.
You could then manipulate the scsb object to rework the connection string to your hearts content.
Use the derived DMadapter class when calling your special proc.
or you could just put in your own connection string when you create the generated adapter as I suggested at first. I like the derived approach because is centralizes the connetion string setting.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Security.Principal;
using YOURDAL.DatabaseSpecific;
using SD.LLBLGen.Pro.ORMSupportClasses;
public class DMAdapter : DataAccessAdapter
{
private string CustomConnectionString()
{
SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder(base.ConnectionString);
string username = WindowsIdentity.GetCurrent().Name.ToString();
scsb.ApplicationName = string.Format("Data Module : {0}", username);
return scsb.ConnectionString;
}
private void init()
{
ConnectionString = CustomConnectionString();
CommandTimeOut = 60;
}
public DMAdapter()
{
init();
}
public DMAdapter(bool keepConnectionOpen)
: base(keepConnectionOpen)
{
init();
}
}