>There is no triggers in the table . it is a simple table with no primary key only 4 fields in tht named as TEST as name c(10),address c(50),city c(10),pincode n(10).
>
>And when i use the command to delete from SQL as
>sqlexec(gnhandle,"delete from test") it works fine but it deletes all the records. Now my problem is that i need to delete only one record e.g
>i need like "delete from test where name = cstest.name)
>here cstest is the alias for the cursoradaptor created.
>
>TIA
>Shailesh
Firs, why you use SPT with CA?
No need of this. Just make CA updatatble and allow Insert, Update and DELETE.
Also you could do smething like yhis (if you stay with SPT)
IF SQLEXEC(sqlHandler,[DELETE FROM Test WHERE Name = ']+cstest.name+[']) < 0
AERROR(aaa)
MessageBox(aaa[1,2])
ENDIF
TEXT TO lcSQL TEXMERGE NOSHOW
DELETE FROM Test WHERE Name = '<<cstest.name>>'
ENDIF
IF SQLEXEC(sqlHandler,lcSQL) < 0
AERROR(aaa)
MessageBox(aaa[1,2])
ENDIF
IF SQLEXEC(sqlHandler,[DELETE FROM Test WHERE Name = ?cstest.name) < 0
AERROR(aaa)
MessageBox(aaa[1,2])
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.