>Is there any changes to the SQL Server statement in VFP 6 since VFP 5? Trying to retrieve a record count through the statement, but does not follow through the procedure.
Please post a snippet of the code that you are trying to use. That way I can see what you're trying to accomplish and can offer a little more help.
FWIW there's no real difference between VFP5 and VFP6 when it comes to connecting to a remote database. SQL Pass through calls in VFP5 work equally well in VFP6 without any syntax changes.
This works in both versions:
* Code begins
Local nHandle, cConnectString, cCommand, nRes
cConnectString =
nHandle = SQLStringConnect( cConnectString )
If nHandle > 0
cCommand = 'Select Count(*) As Count_Of_Hits From YourTable'
nRes = SQLExec( nHandle, cCommand, 'Query_Results' )
If nRes > 0
Select Query_Results
Brow Norm
Else
= MessageBox( 'SQL Command failed' )
EndIf
= SQLDisconnect( nHandle )
Else
= MessageBox( 'Connection failed', 48, 'ODBC Connection problems' )
EndIf
* Code Ends
HTH
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