Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run access 2000 query with activex in DTS?

Status
Not open for further replies.

balistikb

Technical User
Nov 12, 2002
177
US
Is it possible to run a access 2000 query from a DTS? IF so how can this be done?
 
I am using this code and it now opens but the database has a password to enter. Where can I place the password in the code?
 
Sorry here it is...
Function main()
Dim objDB
Set objDB = CreateObject("Access.Application")
objDB.OpenCurrentDatabase("C:\Documents and Settings\wmanzie\Desktop\skillsassesment.mdb")
objDB.DoCmd.Openquery "qryUpdateUnmatched"
objDB.CloseCurrentDatabase
objDB.Quit
main = DTSTaskExecResult_Success
End Function
 
In fact I think
expression.OpenCurrentDatabase(filepath, Exclusive, bstrPassword)

So you can just put the password in the OpenCurrentDatabase.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Can I incorporate your last suggestion in my code somewhere instead of changing the whole thing? If so how?
Thanks
 
None of these suggestions seen to be working for me. Can someone please help me trouble shoot this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top