I am in the process of completing a VB 4.0 application which needs read-only access to a database. This database was originally set up on Sybase, and I accessed it using ODBC (that part worked!). However, it has since migrated to an SQL server, and I've been instructed to avoid using ODBC for configuration reasons.
My problem is in accessing the database now that it's on SQL. Below I've included both the 'old' Sybase call, as well as my attempt at the new call to the SQL server:
'Below are the two statements that we'd used previously to connect to the Sybase database:
'connect_string = "ODBC;DSN=DEPT;DATABASE=EMPLOY;"
'Set db = OpenDatabase("DEPT", False, False, connect_string)
'Below is what I've been trying now that the database has been migrated to SQL:
connect_string = "DSN=DEPX;DATABASE=EMPLOY;"
Set db = OpenDatabase("DEPX", False, False, connect_string)
(DEPT is the Sybase server, DEPX is the SQL server, and EMPLOY is the database name on both servers)
I can access the database using ISQL outside the application, but whenever I try from within the application, it dies with this error:
[ODBC MS SQL Server 6 driver][MS SQL Server 6] Unable to connect: SQL Server is unavailable or does nto exist. Access denied.
Thanks in advance for any help you can give this frustrated newbie!