Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Data Control
Message
De
22/11/2000 09:25:56
 
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00444389
Message ID:
00444576
Vues:
6
>>I'm using an ADO data control against a MS Access secured database.
>>
>>Is there a way not to set the username/pwd ( and path, so the whole connection string in fact :) ) and set those when the form loads?
>>
>>TIA.
>
>Yes but ConnectionString and RecordSource needs to be left blank at design time. You code will then look like this:
>
>
Private Sub Form_Load()
>    With Adodc1
>        .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\BIBLIO.MDB;Persist Security Info=False"
>        .RecordSource = "Authors"
>        .Refresh
>    End With
>End Sub
Excellent.

I knew it should work but was missing something. I tried that before posting but without the recordsource property. Of course it didn't work although I believed it should have.

Thanks a lot.
Ben Rail
Business Solutions
LOGI.design
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform