Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement