Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OpenDatabase with password
Message
 
À
10/05/2000 23:44:32
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00368407
Message ID:
00368477
Vues:
20
>Hi,
> I set password to my Access Database. I tried the following statement to open database, but failed.
>
>
>dim wrk as workspace
>DIM db as Database
>
>Set wrk = CreateWorkspace("", "admin", "", dbUseJet)
>
>Set db = wrk.OpenDatabase("C:\WINDOWS\DESKTOP\PCACCESS.MDB", , True, ";uid=sa;pwd=fong")
>
>
>
>Any ideas?

Put the value False in the options parameter like this:
Private Sub Command1_Click()
Dim wrk As Workspace
Dim db As Database

Set wrk = CreateWorkspace("", "admin", "", dbUseJet)

Set db = wrk.OpenDatabase("C:\bd1.MDB", False, True, ";pwd=123")
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform