Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting query text via ADO in VFP
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Extracting query text via ADO in VFP
Divers
Thread ID:
01151362
Message ID:
01151362
Vues:
91
Hi guys,

I'm trying to pull data from an Access MDB. I can create an object such as
oA2k3 = GetObject(, "Access.Application")
and retrieve table names . . . which I can then extract data via ODBC.
.
.
OPEN DATABASE 'testdata'
STORE SQLCONNECT('db0') TO nConnHandle

FOR n = 0 TO oA2k3.CurrentData.AllTables.Count - 1  && array begins at 0?
  WITH oA2k3.CurrentData.AllTables.Item(n)
    cSQL = 'SELECT TOP 1 * FROM ' + CHR(34) + .Name + CHR(34)
    nRetVal = SQLEXEC(nConnHandle, cSQL, 'results')
  ENDWITH 
ENDFOR 
That works so far.

However, what I want to do is extract the text of the many, many querries. I see an object called "AllQueries" but it doesn't seem to be active.

Is there a way to retrieve the SQL text string (not the results) from the querries?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform