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


Nathan,

First, I don't see any use in using TRANSACTIONS if you are PACKing the table within the transaction. Only use transanctions when a ROLLBACK can be done as well.
Second, you're USEing the tables in SHARED mode. You need EXCLUSIVE mode in order to be able to PACK. Why do you want to PACK your tables anyway? Usually, one only PACKs a table while running maintenance code. You can use SET DELETED ON to 'hide' deleted records. You can shorten your code by not USEing the tables:
* skip this
*IF !USED ("linkpeoplepresent")
*   use linkpeoplepresent shared in 0
*ENDIF
* and specify the db name in your sql statement
INSERT INTO databasename!linkpeoplepresent (presentkey, peoplekey) VALUES (lnPresentKey, nPersonKey)

Just some thoughts. If you need further help, please tell us which line is causing the error.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts

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