>>>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
That answered the question. We are looking into using SQLPREPARE() to precompile the statements that we are sending with SQLEXEC(), inital test show it is faster in most circumstances.
Thanx
Fred Lauckner
You know, it works on my computer. I don't know what your problem is.
.Net aint so bad.