PDA

Click to See Complete Forum and Search --> : VBS & DAO ???


alex_read
Aug 29th, 2000, 10:19 AM
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).


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

Clunietp
Aug 29th, 2000, 10:45 AM
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

alex_read
Aug 30th, 2000, 06:18 AM
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