Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor adapter
Message
 
To
30/03/2006 09:23:37
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01109126
Message ID:
01109159
Views:
40
This message has been marked as the solution to the initial question of the thread.
>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

*** or
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


*** or
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform