Wednesday, July 22, 2009

VB C# .NET connection strings

There is an entire website dedicated to this subject:

Using VB 6 and Sql Server 2000.
In my code I am using open dialog control for selecting the database file, once I selected the database(Dual_ACS.mdf) file, it will appear in the textbox (path and filename)
Textbox name = databasetext
My code.Cn.ConnectionString = "Provider=SQLOLEDB.1; Persist Security Info=False;User ID=" & UName & ";Password=" & PWord & ";InitialCatalog=DUAL_ ACS; Data Source=" & databasetext & ""Cn.Open
But it is showing error. How to write a Proper SQL Connection String?
Need VB 6 code help

No comments:

Post a Comment