Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
Deleting Memory Table |
Tue, Jan 10 2006 12:37 PM | Permanent Link |
"Jack Marsh" | Hi,
I am using DBISAM with Intraweb to create a memory table using the following code: UserSession.DBQ.DatabaseName := 'MyDB'; UserSession.DBQ.SessionName := UserSession.DBS.SessionName; UserSession.DBQ.Prepare; UserSession.DBQ.ExecSQL; UserSession.DBQ.Close; Where the DBISAMQuery DBQ SQL statement is: SELECT * INTO "\Memory\Results" FROM "Contacts" WHERE Surname = 'Anderson' However, when I try to delete the "\Memory\Results" table on the UserSession's onDestroy event using a DBISAMTable component with the following code: if ResultsTbl.Exists then ResultsTbl.DeleteTable; I get a DBISAM 11013 error reported - Access denied to table Results.Dat How do I release the table and why is it locked? (I assumed that calling the DBISAMQuery component's close method would release the table) Thanks for any help, Jack |
Tue, Jan 10 2006 12:59 PM | Permanent Link |
Jeff Cook | "Jack Marsh" <jack@marshdata.co.uk> wrote on Tue, 10 Jan 2006 17:28:44 -0000
>Hi, > >I am using DBISAM with Intraweb to create a memory table using the following >code: > >UserSession.DBQ.DatabaseName := 'MyDB'; >UserSession.DBQ.SessionName := UserSession.DBS.SessionName; >UserSession.DBQ.Prepare; >UserSession.DBQ.ExecSQL; >UserSession.DBQ.Close; > >Where the DBISAMQuery DBQ SQL statement is: > >SELECT * >INTO "\Memory\Results" >FROM "Contacts" >WHERE Surname = 'Anderson' > >However, when I try to delete the "\Memory\Results" table on the >UserSession's onDestroy event using a DBISAMTable component with the >following code: > >if ResultsTbl.Exists then > ResultsTbl.DeleteTable; > >I get a DBISAM 11013 error reported - Access denied to table Results.Dat > >How do I release the table and why is it locked? (I assumed that calling >the DBISAMQuery component's close method would release the table) > >Thanks for any help, >Jack > > Jack Have you closed the query UserSession.DBQ and table ResultsTbl? And if you manually prepared the query, you'll need to unprepare it. HTH Jeff -- Jeff Cook Aspect Systems Ltd Phone: +64-9-424 5388 Skype: jeffcooknz www.aspect.co.nz |
Tue, Jan 10 2006 7:47 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jack,
<< I get a DBISAM 11013 error reported - Access denied to table Results.Dat How do I release the table and why is it locked? (I assumed that calling the DBISAMQuery component's close method would release the table) >> Jeff is correct - you must make sure that if you manually prepared the query using the Prepare method, you need to manually call the UnPrepare method to release the resultant table. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |