Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Access Tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01112620
Message ID:
01112689
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>Hi....looking for the easiest way to Access an Access .mdb, to use like native VFP tables (mostly for querying and reporting).
>
>I was delighted to see in VFP 9.0, that when I went to create a new .DBC container that one of the options was to use an Access .MDB as the basis for the container...but...there is no data transferred.
>
>Is there a one-liner connection string?
>
>TIA

Yes,
constring = "DBQ=f:\...\yourname.mdb;Driver={Driver do Microsoft Access (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8"

sqlHandler = SQLSTRINGCONNECT(constring)
IF sqlhandler < 1
   MESSAGEBOX("No connection")
   RETURN
ENDIF

TEXT TO sqlSelect NOSHOW ...
     SELECT ...  FROM ZZLL ... WHERE...
ENDTEXT

IF SQLEXEC(sqlHandler,sqlselect,"MyCursor") <0
   MESSAGEBOX("Error...")
ENDIF
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform