General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
Password, Access, Select statement
hi,
I'm using VB.Net for my application.
i have an MS Access 2000 database located at "C:\localdata.mdb", and another database "D:\backup.mdb". I have a 'remittance' table under each mdb. I want selective records to put on D:\backup.mdb coming from C:\localdata.mdb. here's a sample of the code.
' code to initialize
' the connection to
' D:\backup.mdb... using the object connKRS -- an ADODB.Connection()
' ....
Dim stQuery As String
stQuery = "INSERT INTO remittance SELECT * FROM remittance IN " + """" + "C:\localdata.mdb" + """" + " Where (DateTimeStamp >= #6/16/2003 12:00:00 AM# And DateTimeStamp < #6/17/2003 12:00:00 AM#)"
' this will fill remittance table in the d:\backup.mdb with
' selected records coming from the remittance table in the c:\localdata.mdb
connKRS.Execute(stQuery)
connKRS.Close()
Everything was working fine, until one day, I have added a 'database password' on the C:\localdatabase.mdb.. the password is "password". executing the same code would result in a "Not a valid password" message. how do I make it work?
i'm thinking of something like:
stQuery = "INSERT INTO remittance SELECT * FROM remittance IN "C:\localdata.mdb" DATABASEPASSWORD = "password""
obviously, this is not the answer. :(
Please help. Thank you so much and God Bless.
-Erik
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only