I am using VFP9 and try to update SQL 2008 R2 table using SQLEXEC. In my program I use the below code to update the sql table;
lcSqlsting ="UPDATE [cdswms].[dbo].[ITEMS] SET [ORDID]='454879',[SEQ]='2',[QTYORD]= 3024,[QTYRES]= 3024,[QTYALL]= 3024,[QTYSHP]= 3024 WHERE SQLROWID = 14556"
lnRetValue = SQLEXEC(g_conHand,lcSqlString)
In my test I know SQLROWID = 14556 is not in my table and I am expecting lnRetValue -1, but it always returns 1 which indicates the update completed and no record is updated. Of course I can check that the record exist or not before I call the update command. My concern is that why it is not returning error.
Any help or suggestion is appreciated.
Thanks
lcSqlsting ="UPDATE [cdswms].[dbo].[ITEMS] SET [ORDID]='454879',[SEQ]='2',[QTYORD]= 3024,[QTYRES]= 3024,[QTYALL]= 3024,[QTYSHP]= 3024 WHERE SQLROWID = 14556"
lnRetValue = SQLEXEC(g_conHand,lcSqlString)
In my test I know SQLROWID = 14556 is not in my table and I am expecting lnRetValue -1, but it always returns 1 which indicates the update completed and no record is updated. Of course I can check that the record exist or not before I call the update command. My concern is that why it is not returning error.
Any help or suggestion is appreciated.
Thanks