Results 1 to 3 of 3

Thread: VBS & DAO ???

  1. #1

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Talking

    Hi Everyone! I have used DAO with VBScript before to access access!

    I have some old notes which were not jotted down well & the code is not working (I get an error with IE recognising the application part).

    Code:
    Dim DAO, DB, RS
    Set DAO = application.createobject("DAO.DBEngine.35")
    Set DB = DAO.Workspaces(0).OpenDatabase("C:\DB_Name.mdb")
    Set RS = DB.OpenRecordset("A_Table")
    Many Thanks everyone!
    Alex Read

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    I'm assuming that this is client-side VBScript

    change this:
    Set DAO = application.createobject("DAO.DBEngine.35")

    to this:
    Set DAO = createobject("DAO.DBEngine.35")


    That should work OK



    Tom

  3. #3

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    erm....

    Thank you Clunietp for your reply. Two things though -

    1). I am not sure with the "client-side" bit - I am just doing a web page for myself at home to practice.

    2). I recieve an error :

    Activex component can't create object 'DAO.DBEngine.35'
    Thank you for you last post, I hope you could help with this one too! Thank you
    Alex Read

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

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



Click Here to Expand Forum to Full Width