>>Hi,
>>
>>I use CursorAdapters for inserting/updating/delete data in SQL Server. I have a base class that all tables use. The problem is when I try to delete a record in one of the tables it does not work. I get no error and when I step through the code in debugger everything seem to be normal. But the record in SQL Server never gets deleted. I have checked the code in the CursorAdapter class, method BeforeDelete and it correctly has expression:
>>
>>delete from TableName where Pk_Fld = ?oldval('Pk_fld','CaViewName')
>>
>>
>>I also checked in the same method that the value of oldVal('pk_fld') is the one I am trying to delete.
>>
>>When I delete a record from another table (using the same base class), it works.
>>
>>Where should I look for? In SQL Server? or in my VFP code? TIA.
>
>
>Run SQL Profiler and see what happens at the SQL Server end.
Here is the line from the SQL Server Profiler trace relevant to the table where I am deleting a record:
exec sp_executesql N'DELETE FROM EQ_FILE WHERE EQUIP_PK=@P1 ',N'@P1 int',755
The value 755 above is the actual PK value that I am attempting to delete.
The EventClass says 'RPC:Completed.
So it look (at least to me) as everything should work. Yet the record of PK 755 is never deleted.
What am I missing?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham