Results 1 to 3 of 3

Thread: DAO with ASP

  1. #1
    Join Date
    Dec 2002
    Location
    i like pogo sticks
    Posts
    2

    Unanswered: 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

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Is there any particular reason you do not want to use ado ?

  3. #3
    Join Date
    Dec 2002
    Location
    i like pogo sticks
    Posts
    2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •