How to change "Main.ConnectionString

Posts   
 
    
nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 24-Feb-2010 12:54:21   
<add key="Main.ConnectionString" value="Server=192.168.200.10;Database=DD;User ID=sa;Password=123;"/>

the key is "Main.ConnectionString", how to change it to other value?

Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 24-Feb-2010 15:06:58   

From the Project Properties in the Designer -> ConnectionStringKeyName You will have to regenerate the code for this to take effect.

nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 24-Feb-2010 15:15:59   

Thank you very much

carni4
User
Posts: 20
Joined: 09-Aug-2010
# Posted on: 09-Aug-2010 20:06:33   

Is this still valid for version 3.0? All I see in the designer is ConnectionStringKeyNamePattern, which contains ConnectionString.{$ProviderName}

nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 10-Aug-2010 02:51:43   

i am not sure, but you can try. also ,you can read the manuall carefully, maybe you will find answer.

Daniel

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-Aug-2010 05:33:14   

carni4 wrote:

Is this still valid for version 3.0? All I see in the designer is ConnectionStringKeyNamePattern, which contains ConnectionString.{$ProviderName}

That's it. You can change it of course. I quote the manual:

**ConnectionStringKeyNamePattern **The pattern for the key in the generated config file under which the connection string for a target database is stored. A macro is required for this property: {$ProviderName}. This macro is replaced with the short name in the driver.config of the active driver. This way multiple connection strings can be emitted into the generated code without name clashes.

David Elizondo | LLBLGen Support Team
carni4
User
Posts: 20
Joined: 09-Aug-2010
# Posted on: 10-Aug-2010 06:00:47   

Thanks. I guess I wasn't sure if I could remove the "provider name" token. I can confirm that this works as expected.