Quote:
Originally posted by rnealejr
Is there any particular reason you do not want to use ado ?
|
we are analyzing a legacy application that uses DAO in webclasses. when the developer built the application he ran into a problem accessing remote databases through DAO and ODBC in webclasses.
as a work around, he uses a nightly batch process to copy data locally. we are looking for a fix to the odbc problem so that the data does not need to be copied locally. in the short term, porting all database code to ADO is not feasible.
this is the dao code running in a web class. it returns error: 3151 DAO.WorkspaceDescription: ODBC--connection to 'ODBC' failed.
any ideas?
Dim wk As DAO.Workspace
Dim db As DAO.Database
Set wk = DBEngine.Workspaces(0)
Set db = wk.OpenDatabase("", Options:=False, ReadOnly:=False, Connect:="ODBC;DSN=testsql")
If Err.Number <> 0 Then
Response.Write Err.Number & Err.Description
End If
as a troubleshooting step, i wanted to verify whether the same code would fail in an asp page, I but don't know how to create the DAO objects in the asp page.