Accessing SQL Server with a Visual Basic application
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?

Software/Hardware used:
ASKED: September 11, 2008  5:40 PM
UPDATED: September 12, 2008  1:59 AM

Answer Wiki:
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?
Last Wiki Answer Submitted:  September 12, 2008  1:59 am  by  Flame   14,895 pts.
All Answer Wiki Contributors:  Flame   14,895 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _