Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Fox 6 SQL Server
Message
From
10/07/2001 15:02:23
 
 
To
10/07/2001 14:35:19
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00528816
Message ID:
00528832
Views:
19
>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
Map
View

Click here to load this message in the networking platform