Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What could cause delete in SQL Serv not work
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01545246
Message ID:
01545272
Views:
33
>>>>>>
>>>>>>Try:
>>>>>>
>>>>>>exec sp_executesql N'DELETE FROM EQ_FILE WHERE EQUIP_PK=@P1 ',N'@P1 int',755
>>>>>>GO 
>>>>>>DELETE FROM EQ_FILE WHERE EQUIP_PK=755
>>>>>>GO 
>>>>>>SELECT * FROM  EQ_FILE WHERE EQUIP_PK=755
>>>>>>GO
>>>>>>SELECT DB_NAME()
>>>>>>
>>>>>
>>>>>The record is there and the name of the database is correct. And I tried it with another PK value but with the same result. Record is never deleted. Strange.
>>>>
>>>>
>>>>HOW about @@TRANCOUNT?
>>>
>>>Sorry for ignorance, but where do I put this line, right after the DELETE command?
>>
>>Before.
>
>By itself @@TRANCOUNT does not work. So I did the following, right before I call DELTE:
>
>
>Delcare @Test INT
>SET @test = @@TRANCOUNT
>
>
>But the above showed nothing new.
SELECT @@TRANCOUNT
When you use SET it just SETs no results whatsoever.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform