General information
Category:
Coding, syntax & commands
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)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only