Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Password, Access, Select statement
Message
De
15/06/2003 22:22:05
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Password, Access, Select statement
Divers
Thread ID:
00800231
Message ID:
00800231
Vues:
54
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform