all groups > dotnet academic > january 2004 >
You're in the

dotnet academic

group:

proper way to data bind in vb.net?



proper way to data bind in vb.net? lori
1/30/2004 8:31:10 AM
dotnet academic: Hi,

Does anybody know if there is a proper way to data bind to an SQL server in VB.Net?

Should I 'drag' the connection, dataAdapters and DataSource from the toolbox onto my form,

OR

Should I use a Protected Const SQL_CONNECTION_STRING As string from within the VB code, like they do in all the MIcrosoft samples?

RE: proper way to data bind in vb.net? Hi Lori
2/3/2004 2:41:05 PM
The best way to configure your dataconnection is definately to configure it in app.config

Select the SqlConnection, choose DynamicProperties in the properties pane, and configure a key for your ConnectionString
This will create an app.config file and a mapping to it. Now you can easily change the connection by editing the app.config file, which is in xml format

AddThis Social Bookmark Button