Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Multi-Thread Queries?? |
Thu, Jan 30 2014 4:53 PM | Permanent Link |
Praveen A B | I'm using Delphi 2007 and DBISAM 4.26 b3. I have some questions regarding accessing and populating dbisam datasets in threads.
1) I have 20 local tables in folder C:\TempDB. At application startup I copy them to MEMORY DB as below - //This procedure is called in a thread. procedure CreateCache; var tblTemp: TDBISAMTable; begin tblTemp := TDBISAMTable.Create(nil); for i := 1 to 20 do begin tblTemp.DataBaseName := C:\TempDB; tblTemp.TableName := CacheTableName[i]; tblTemp.Open; tblTemp.CopyTable('MEMORY', tblTemp.TableName); tblTemp.Close; end; tblTemp.Free; end; Is the above code fine or do I need to create Session and Database components with new SessionName. 2) I have TDBISAMTable, say tblMain, which is connected to a grid component. In order to populate data, I send an SOAP-XML request to server and the xml response is parsed and populated into tblMain. This process happens in a thread which references tblMain, Do I need to have new sessionname and database component in thread when working with tblMain ? |
Fri, Jan 31 2014 4:46 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Praveen,
<< Is the above code fine or do I need to create Session and Database components with new SessionName. >> You need to create a separate TDBISAMSession, at the very least. You can skip creating a separate TDBISAMDatabase at just specify the database name (if remote) or database path (if local). << 2) I have TDBISAMTable, say tblMain, which is connected to a grid component. In order to populate data, I send an SOAP-XML request to server and the xml response is parsed and populated into tblMain. This process happens in a thread which references tblMain, Do I need to have new sessionname and database component in thread when working with tblMain ? >> Yes. You'll need to do the work in the thread with separate component instances, and then call Refresh on the table instance in the main thread when done. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |