Marivic
Nov 14th, 2002, 03:02 AM
Hi all,
I have an SQLConnection object drag to the form at design time. How can I set the connection string that will be mapped to the configuration file.
I tried this defining from the properties window under (dynamicproperties) - ConnectionString. I set this to the name of the key from my app.config file. But when I run the program , it gave me an error: The ConnectionString property has not been initialized:
Below is my app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appsettings>
<add key="ConnectionString" value="data source=SDI-DEVT_SRV;initial catalog=vendor;persist security info=False;user id=sa;password=default;packet size=4096" />
</appsettings>
</configuration>
Thanks in advance for any help. I would really appreciate them.
Marivic
I have an SQLConnection object drag to the form at design time. How can I set the connection string that will be mapped to the configuration file.
I tried this defining from the properties window under (dynamicproperties) - ConnectionString. I set this to the name of the key from my app.config file. But when I run the program , it gave me an error: The ConnectionString property has not been initialized:
Below is my app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appsettings>
<add key="ConnectionString" value="data source=SDI-DEVT_SRV;initial catalog=vendor;persist security info=False;user id=sa;password=default;packet size=4096" />
</appsettings>
</configuration>
Thanks in advance for any help. I would really appreciate them.
Marivic