Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Front-end SQL Server
Message
From
15/11/1999 15:53:26
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00291216
Message ID:
00291279
Views:
33
>>SQL Pass-Through (SPT), will do this. Here's a simple example:
>>
>>myHandle = SQLCONNECT("yourDSN","yourUSERID","yourPASSWORD")
>>
>>=SQLEXEC(myHandle,"INSERT yourTable VALUES ('a','b','c')")
>>
>>=SQLDISCONNECT(myHandle)
>>
>>All the string parameters can of course be variables that you construct elsewhere.
>>
>>HTH
>>
>>>Is there a way to build a SQL statement (Update or Insert) on the client and pass the entire statement to be executed on SQL Server?
>>>
>>>I am using VFP 6.0 to frontend SQL Server 7.0. I want to build a generic update or insert string based on the current record set and pass the string to SQL Server for processing.
>>>
>>>Is there a stored procedure I can pass the SQL String to and have it processed?
>
>
>Are you sure that the SQL statement is passed to the server and the server processes the statement? Programmers here (maybe mistakenly) believe that SQL statements executed with SQLEXEC() are processed by the client PC's processor, not the server's processor.

Yes, mistakenly. How could the VFP engine evaluate the SQL when it doesn't even have access to the Server Data?

From the Hackers Guide:

The "exec" here stands for "execute". SQLExec() sends commands to the server to be executed.

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform