Accessing SQL Server with a Visual Basic application

Tags:
SQL Server
Visual Basic 6
I have an application in Visual Basic 6 with SQL Server as the back-end. It is supposed to be run on a server, but it will not access the server when installed and run on a client’s machine. I think it might be a code issue; I have used the following coding at form load: cnh = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Pharmacy;Data Source=WIN2006" db.Open cnh db.CursorLocation = adUseClient Is this code accurate?

Answer Wiki

Thanks. We'll let you know when a new response is added.

The code question would probably be a MrDenny area, and I hoping he responds to this question. When I’ve had problems connecting with SQL databases on networks, most were resolved by correcting the Data Sources (ODBC) settings in the Administrative tools in the Control Panel of the client machine.
Good Luck
**************************************************************

Assuming that the server name in WIN2006 that code appears correct.

What error message are you getting when you try and connect (the actual message back from the OLEDB driver)? Have you tried the native tools to see if they work?

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following