Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
dynamically created query |
Wed, Jun 28 2006 2:12 PM | Permanent Link |
Marc Pelletier | Hello,
I am creating a query at runtime and associating it with a database in a datamodule. The database directory is also dynamic. I create the query like this function TdmFPLink.CreateImageQuery( ): TDBIsamQuery; begin result := TDBISAMQuery.Create( self); // dbImages is a DBIsamDatabase result.DatabaseName := dbImages.DatabaseName; result.SQL.Add( 'Select Image, Time from :TableName where Flight = :Flt ' ); result.SQL.Add( 'and Time >= :StartTime and Time <= :EndTime ' ); result.SQL.Add( 'order by Time' ); end; and before opening it. I make sure the dbImages db has the appropriate directory set by doing dbImages.Close; dbImages.Directory := fImagePath; When I subsequently open the table I get a access error at a very low address (8db), which implies something isn't being initialized properly. Any ideas? cheers Marc Pelletier Goldak Airborne Surveys |
Wed, Jun 28 2006 5:17 PM | Permanent Link |
Marc Pelletier | Marc Pelletier <marc@stopspam.goldak.ca> wrote in
news:Xns97F07B1B68F42mmpp1234.dd@64.65.248.118: > result.SQL.Add( 'Select Image, Time from :TableName where Flight = > :Flt > ' ); > result.SQL.Add( 'and Time >= :StartTime and Time <= :EndTime ' ); > result.SQL.Add( 'order by Time' ); > > Okay, you can't assign the table with a param. Got it. Marc |
Thu, Jun 29 2006 3:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Marc,
<< When I subsequently open the table I get a access error at a very low address (8db), which implies something isn't being initialized properly. >> You've already found the answer, but regardless, DBISAM shouldn't be AVing. I will make sure that this is corrected. -- 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 |