If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > DAO with ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-02, 22:09
cullepm3 cullepm3 is offline
Registered User
 
Join Date: Dec 2002
Location: i like pogo sticks
Posts: 2
DAO with ASP

Is it possible to use DAO in ASP?

I have tried the following:
set wk = server.createobject("DAO.Workspace")

Thanks,
Patrick Cullen
Reply With Quote
  #2 (permalink)  
Old 12-18-02, 14:03
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Is there any particular reason you do not want to use ado ?
Reply With Quote
  #3 (permalink)  
Old 12-18-02, 16:44
cullepm3 cullepm3 is offline
Registered User
 
Join Date: Dec 2002
Location: i like pogo sticks
Posts: 2
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On