Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 11 total |
Error 11013 with Memory Database |
Wed, Jun 4 2008 7:16 PM | Permanent Link |
Gordon Turner | I'm familiar with the problems caused by AV software that generate the
11013 error. However I am under the impression that using the Memory database results in no files being created. So I have a customer who is getting 11013 when executing the following: NewQuery := TDBISAMQuery.Create(nil); with NewQuery do begin DatabaseName := 'Memory'; SessionName := DeletedDataMod.DeletedSession.SessionName; SQL.Add('select count(*) as RecCount' + ' from DeletedFolder F' + ' where DeletedBy LIKE ' + QuotedStr('F%') + ' and FolderID in (select FolderID from DeletedFolderContent' + ' where not DeletedBy LIKE ' + QuotedStr('%L%') + ')'); Active := True; DeletedRecs := FieldByName('RecCount').AsInteger > 0; Active := False; end; FreeAndNil(NewQuery); The 11013 occurs when the query is made Active. I've also set the following: Engine.CreateTempTablesInDatabase := True; Engine.TableDataTempExtension := '.dxt'; Engine.TableIndexTempExtension := '.dxx'; Engine.TableBlobTempExtension := '.dxb'; if GetTempPath(256, TempDir) = 0 then AppSession.PrivateDir := ExtractFilePath(Application.ExeName) else AppSession.PrivateDir := TempDir; Other temp tables are created in the data folder, but I do not see a temp file created for the query in either the data folder or in the PrivateDir. What am I missing that would cause the 11013 error? -- Gordon Turner Mycroft Computing http://www.mycroftcomputing.com |
Wed, Jun 4 2008 7:23 PM | Permanent Link |
Gordon Turner | Sorry, it's late in the day and I realized I forgot some critical
information in my post. I'm using DBISAM 4.25 Build 7 with Delphi 2006. Also, I noticed that the KeepConnections property for the DeletedSession is set to True, but since all the tables associated with the session are assigned to the Memory database, I'm not sure what impact that property would have on the 11013 error. -- Gordon Turner Mycroft Computing http://www.mycroftcomputing.com |
Thu, Jun 5 2008 6:43 AM | Permanent Link |
Fernando Dias Team Elevate | Gordon,
> SQL.Add('select count(*) as RecCount' > + ' from DeletedFolder F' Where is "DeletedFolder" table located? Is it an in-memory table created before? Anyway, a possible cause for the error message is if you have the table exclusively opened before opening NewQuery. -- Fernando Dias [Team Elevate] |
Thu, Jun 5 2008 9:11 AM | Permanent Link |
Gordon Turner | Fernando Dias [Team Elevate] wrote:
> > Where is "DeletedFolder" table located? Is it an in-memory table created > before? > Anyway, a possible cause for the error message is if you have the table > exclusively opened before opening NewQuery. > The DeletedFolder table is an in-memory table created when the program starts. This same code works fine on all of my workstations, so I'm sure it is an environmental thing. The exception message was: DBISAM Engine Error # 11013 Access denied to table or backup file '79520' But my real question was about how queries against in-memory tables work. For normal tables, I know DBISAM creates temp files for the results. How does it work for in-memory tables - the Memory database? In my program, I use a set of in-memory tables to hold deleted records - to allow the user to un-delete during their session with the program. The "delete" tables are in a separate data module with their own session component, and are opened with Exclusive := False. So my assumption was that Engine properties I set affect all tables in all data modules, not just the data module where I set the Engine properties. I've set Engine.CreateTempTablesInDatabase := True, but when I stop the code just after the problem query is made Active, I don't see new temp files created in the database folder. -- Gordon Turner Mycroft Computing http://www.mycroftcomputing.com |
Thu, Jun 5 2008 12:46 PM | Permanent Link |
Fernando Dias Team Elevate | Gordon,
> But my real question was about how queries against in-memory tables > work. For normal tables, I know DBISAM creates temp files for the > results. How does it work for in-memory tables - the Memory database? The same way. If the query is not live a temporary file will be created on disk. > component, and are opened with Exclusive := False. In that case, and considering the table's name in the error message, it is certainly caused by the temporary file being created in a read-only directory or a directory where the current user doesn't have sufficient permissions. > I've set Engine.CreateTempTablesInDatabase := True, but when I stop > the code just after the problem query is made Active, I don't see new > temp files created in the database folder. The "CreateTempTablesInDatabase" property only applies to temporary tables created by restructuring, optimizing or upgrading operations - it doesn't not apply to the temporary tables created by DBISAM for canned query result sets. -- Fernando Dias [Team Elevate] |
Thu, Jun 5 2008 3:56 PM | Permanent Link |
Gordon Turner | Fernando Dias [Team Elevate] wrote:
> > The "CreateTempTablesInDatabase" property only applies to temporary > tables created by restructuring, optimizing or upgrading operations - it > doesn't not apply to the temporary tables created by DBISAM for canned > query result sets. > OK, so I'll need to set the PrivateDir value of all session components in my application, not just the ones associated with physical tables. -- Gordon Turner Mycroft Computing http://www.mycroftcomputing.com |
Thu, Jun 5 2008 7:04 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Gordon,
<< The 11013 occurs when the query is made Active. I've also set the following: >> Which table name is it saying that it cannot find in the 11013 error message ? CreateTempTablesInDatabase only applies to table upgrade, alteration, or optimization processes, not query temporary tables: http://www.elevatesoft.com/manual?action=mancompprop&id=dbisam4&product=d&version=7&comp=TDBISAMEngine&prop=CreateTempTablesInDatabase Query temporary tables are always created in the session's PrivateDir setting. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jun 6 2008 5:42 AM | Permanent Link |
Fernando Dias Team Elevate | Gordon,
> OK, so I'll need to set the PrivateDir value of all session components in > my application, not just the ones associated with physical tables. Yes, and if you don't want to have temp files around and have sufficient memory, then you can always SELECT ... INTO "Memory\ ... " so that all your temp tables are in-memory tables. BTW, you should add a try/finally block to your code or your app will be leaking memory each time the sql fails. -- Fernando Dias [Team Elevate] |
Fri, Jun 6 2008 10:57 AM | Permanent Link |
Gordon Turner | Thanks Fernando, I didn't know that about select statements that return
results. I'll have to incorporate that into future updates to all my products. -- Gordon Turner Mycroft Computing http://www.mycroftcomputing.com |
Fri, Jun 6 2008 10:59 AM | Permanent Link |
Gordon Turner | Tim Young [Elevate Software] wrote:
> > Which table name is it saying that it cannot find in the 11013 error message > ? The message was: DBISAM Engine Error # 11013 Access denied to table or backup file '79520'. But I think Fernando helped resolve the problem. I had the PrivateDir set to C:\Temp thinking it didn't matter because all the tables were in the Memory database. I assume that if the user did not have a C:\Temp folder (or what ever folder the PrivateDir is set to), the error might occur. -- Gordon Turner Mycroft Computing http://www.mycroftcomputing.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, April 23, 2024 at 08:10 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |