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