I create a DSN connection through Data Source (ODBC). How to use the DSN in VB Project. I use one in my previous project but the database is MS Access. This time I'm using SQL Server 2000 as database. Please Help
Printable View
I create a DSN connection through Data Source (ODBC). How to use the DSN in VB Project. I use one in my previous project but the database is MS Access. This time I'm using SQL Server 2000 as database. Please Help
I use the following code
<code> Dim con AS NEW Connection </code>
<code> conStr = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=DataServer" </code>
<code> con.ConnectionString = conStr </code>
Here "DataServer" is the DSN name I have created in Data source.