joebickley
Programmer
Hi
I have set up a front end for a SQL 200 server using access 97 and i now want to use VB5 to do the same thing. I need to connect to a SQL server table in code to do some data processing. In access i used the VBA code show below. But when using access i have the tables linked so i just need to refer to the table name. How do i connect to the table with out this. here is my MS access VBA code
Dim findcar As Recordset
Dim db As Database
Set db = DBEngine.Workspaces(0).Databases(0)
Set findcar = db.OpenRecordset("tablewhatever", , dbSeeChanges)
vinsent = findcar![6FigVIN]
buildpsent = findcar![ProdStage]
engsent = findcar![Engine]
drvsdsent = findcar![Steering]
findcar.Close
I guess it should not be a million miles away from this i think i need to set up a connection but i do not know how. Pleas help
Joe bickley Office automation specialist
Land Rover UK
I have set up a front end for a SQL 200 server using access 97 and i now want to use VB5 to do the same thing. I need to connect to a SQL server table in code to do some data processing. In access i used the VBA code show below. But when using access i have the tables linked so i just need to refer to the table name. How do i connect to the table with out this. here is my MS access VBA code
Dim findcar As Recordset
Dim db As Database
Set db = DBEngine.Workspaces(0).Databases(0)
Set findcar = db.OpenRecordset("tablewhatever", , dbSeeChanges)
vinsent = findcar![6FigVIN]
buildpsent = findcar![ProdStage]
engsent = findcar![Engine]
drvsdsent = findcar![Steering]
findcar.Close
I guess it should not be a million miles away from this i think i need to set up a connection but i do not know how. Pleas help
Joe bickley Office automation specialist
Land Rover UK