Hi All,
I am using Access 2003. I have a function that I have been using to log
on to linked tables using the system ODBC and it has been working great.
Now I want to do the same thing using a file dsn that connect to a
database using windows integrated security and I can't seem to get the
syntax right.
This is the only DAO code I use any more, is there an ADO equivalent?
Please take a look at this tell me what's wrong, or suggest a better
function!
Thanks!
Kathy
Function OpenConnectionX()
'Sets connection to ODBC datasource defined by DSN DV1.dsn
'Prevents the user from having to log into Db
'Requires DAO reference
Dim wrkJet As Workspace
Dim dbsSTL As Database
Set wrkJet = DBEngine.Workspaces(0)
Set dbsSTL = wrkJet.OpenDatabase("DV1.dsn", dbDriverNoPrompt, True, _
"ODBC;DATABASE=DV1;UID=myusername;PWD=;DSN = C:\Program Files\Common
Files\ODBC\Data Sources/DV1.dsn")
End Function
*** Sent via Developersdex http://www.developersdex.com ***