Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading an MDB file from VFP
Message
De
30/05/2003 15:55:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00794718
Message ID:
00794726
Vues:
9
>I have a MDB file and want to "access" it thru my vfp. Can I do this or must I convert the file from within Access so that VFP can read it?
>Thanks.

See if the following example helps:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" ;
      + "Data Source=C:\Temp\MiAccess.mdb;" ;
      + "Jet OLEDB:Database Password=xxxx;"

Conn = CreateObject("ADODB.Connection")
With Conn
         .CursorLocation = 3 && adUseClient
         .ConnectionString = strConn
         .Open
EndWith

sSql = "Select * From myTable"

RS = Conn.Execute(sSql)
? RS.Fields(0).Value
* .. etc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform