I'll give you a simple one here:
lnSQLHandle = SQLCONNECT("myDSN","myUser","myPassword")
IF lnSQLHandle > 0
lnResult = SQLEXEC(lnSQLHandle, "Insert Mytable Values('a','b','c')")
IF lnResult <> -1
WAIT WINDOW "Success!"
ELSE
=AERROR(myErr)
WAIT WINDOW myErr(1,2)
ENDIF
=SQLDISCONNECT(lnSQLHandle)
ELSE
=AERROR(myErr)
WAIT WINDOW myErr(1,2)
ENDIF
HTH
>Is there any examples of a complete sequence for using sql pass through to insert new records into a table existing on an MS/sql server? I can't seem to find any full documentation.
>
>What I want to do is insert records into a database on a ms/sql server using SPT. Thanks in advance!
>
>Gary
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams