I have an old VB5 app which connects to an Access database and then loops through a recordest creating an array of labels for the records.
I have been asked to link to a different database which is in SQL Server 2000.
The code I used to connect to the access database was as follows:
Dim MyWrkSpace As Workspace
Dim Db As Database
Dim Rs As Recordset
Set MyWrkSpace = CreateWorkspace("MyWrkSpace", "admin", "")
Set Db = MyWrkSpace.OpenDatabase("\\ServerName\Press$\PressEnquiries.mdb")
Can anyone tell me how to alter this to connect to a SQL Server database?
I have been asked to link to a different database which is in SQL Server 2000.
The code I used to connect to the access database was as follows:
Dim MyWrkSpace As Workspace
Dim Db As Database
Dim Rs As Recordset
Set MyWrkSpace = CreateWorkspace("MyWrkSpace", "admin", "")
Set Db = MyWrkSpace.OpenDatabase("\\ServerName\Press$\PressEnquiries.mdb")
Can anyone tell me how to alter this to connect to a SQL Server database?