>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
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