Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Nathan Gloyn
  Where is Nathan Gloyn?
 Torquay
 United Kingdom
 Nathan Gloyn
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: Multiple SQL Statements
Thread ID: 33992 Message ID: 34000 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Friday, December 05, 2003 11:08:17 PM         
   


Thanks for the feedback Eric.

The code I posted was me grasping at straws as nothing i did seemed to work. I have changed my code (below) but now I don't get any errors, the inserts work but the deletes don't seem to have any effect, I have checked the tables and the records aren't even marked as deleted. What am I missing??

*get next key from counter table
lnPresentKey=getnextkey("present")

BEGIN TRANSACTION

* Remove link
DELETE FROM christmas!linkpeopleidea ;
WHERE	ideakey = lnideakey ;
AND		peoplekey = nPersonKey

* Add gift record
INSERT INTO christmas!present (presentkey, present) ;
VALUES	(lnPresentKey, lcPresent)

* add gift link
INSERT	INTO christmas!linkpeoplepresent (presentkey, peoplekey) ;
VALUES	(lnPresentKey, nPersonKey)

* Delete idea record
DELETE FROM christmas!idea ;
WHERE	ideakey = lnideakey

END TRANSACTION

* update the counter table
updatekey("present")


ENTIRE THREAD

Multiple SQL Statemetns Posted by Nathan Gloyn @ 12/5/2003 6:39:41 PM
RE: Multiple SQL Statemetns Posted by Eric den Doop @ 12/5/2003 7:53:41 PM
RE: Multiple SQL Statements Posted by Nathan Gloyn @ 12/5/2003 11:08:17 PM
RE: Multiple SQL Statements Posted by Eric den Doop @ 12/6/2003 2:03:36 AM
RE: Multiple SQL Statements Posted by Nathan Gloyn @ 12/7/2003 9:58:05 PM