Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Password, Access, Select statement
Message
From
15/06/2003 22:22:05
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Password, Access, Select statement
Miscellaneous
Thread ID:
00800231
Message ID:
00800231
Views:
53
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
Map
View

Click here to load this message in the networking platform