By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,062 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

Connection ERROR

P: 1
hello all am new to Vb I am connecting to sql server which is in different machine but when i use the code below its giving me an error sql not server not found
please suggest me how to proceed further.
Dim cn As New ADODB.Connection
Dim provStr As String

' Specify the OLE DB provider.
cn.Provider = "sqloledb"

please let me know what are pre-req i have to follow in connecting. i.e driver connection preferences to be added. :)

' Specify connection string on Open method.
ProvStr = "Server="MAchine IP address";Database=employee;Trusted_Connection=yes"
cn.Open provStr
Dec 29 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.