Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC
Message
 
À
26/04/2000 20:35:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: ODBC
Divers
Thread ID:
00363906
Message ID:
00364161
Vues:
19
I do this a lot in my applications because I'm always linking two applications together. Here is a sample of my usage:

if BG.Is_SQL = 1
nWaC1 = sqlstringconnect([DSN=]+BG.DSNGMContact+[;UID=sa;PWD=;AutoTranslate=No;UseProcForPrepare=0;QuotedId=No;AnsiNPW=No])
cSQLSend = [select Contact1.AccountNo, Contact1.Notes from Contact1]
else
nWaC1 = sqlstringconnect([DSN=dBASE Files;DBQ=]+BG.GMDatabase+[;DefaultDir=]+BG.GMDatabase+[;DriverId=533;MaxBufferSize=2048;PageTimeout=5;])
cSQLSend = [select Contact1.AccountNo, Contact1.Notes from Contact1 where Contact1.Notes > ' ']
endif
do while .T.
sqlexec(nWaC1, cSQLSend, 'NotesTable')
nDoAgain = sqlmoreresults(nWaC1)
if nDoAgain = 2
exit
endif
enddo

The first connection is for MSSQL and the second is for dBase IV.

Hope this is useful.

DJ :o)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform