The best way is to use SPT parameters
=SQLExec(gnConnectionHandle, ;
"INSERT INTO [TRANSFILE].[DBO].[ADJFILE] (DESCRIPTION, TNUMBER) VALUES (?cDescription, ?nTNumber)")
The Textmerge would be my second choice.
>Please check the codes, and help me to find the correct way of doing this, I can't find a solution as I am new to SQL server.
>
>In SQL Table
>DESCRIPTION NVARCHAR (25)
>TNUMBER FLOAT
>
>In FoxPro Form
>cDescription = AllTrim(Thisform.txtDescription.Value) <--- character value
>nTNumber = Thisform.txtTNumber.Value <--- numeric value
>
>=SQLExec(gnConnectionHandle, "INSERT INTO [TRANSFILE].[DBO].[ADJFILE] (DESCRIPTION) VALUES ('&cDescription') " ) <--- this command works and saves the record
>
>=SQLExec(gnConnectionHandle, "INSERT INTO [TRANSFILE].[DBO].[ADJFILE] (TNUMBER) VALUES ('&nTNumber') " ) <--- this command doesn't work
>
>Did I miss something here?
--sb--