Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Access Table
Message
 
À
07/03/2005 07:27:55
Ashish Patel
Hindustan Petroleum
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP3
Database:
Jet/Access Engine
Divers
Thread ID:
00993235
Message ID:
00993240
Vues:
13
>Hi,
>
>How to access an Access Database from VFP6 Form ?
>
>
>Regards
>
>Ashish Patel

Try this code:
constring = "DBQ=path\your.mdb;Driver={Driver do Microsoft Access (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;"
sqlHandler = SQLSTRINGCONNECT(constring)
IF sqlhandler < 1
   MESSAGEBOX("No made connection")
   RETURN
ENDIF

sqlselect = "SELECT table_mdb.*  FROM table_mdb  WHERE your_choice INTO ...."

IF SQLEXEC(sqlHandler,sqlselect,"MyCursor") <0
      MESSAGEBOX("Error.....")
ENDIF

The data are in MyCursor
_______________________________________________________________
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