Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Creating a Query at Runtime |
Tue, May 8 2007 8:48 PM | Permanent Link |
Richard Harding | I wish to create a query at runtime. When the program attempt to open the query, the
error "Invalid session name sesTest" occurs. I reckon the the session exists, but ElevateDB disagrees. The session name is copied from an existing query. Does anyone have any idea of what I am doing wrong? Thank you . . Richard Harding . . . var ChildQuery: TQuery; ChildDataSource: TDataSource; begin ChildDataSource := TDataSource.Create(Self); ChildDataSource.Name := 'ChildDataSource' + IntToStr(node.Level + 1); ChildQuery := TQuery.Create(Self); ChildDataSource.DataSet := ChildQuery; with ChildQuery do begin ChildQuery.SQL.Assign(dmData.qyChildNodes.SQL); ChildQuery.Params.Assign(dmData.qyChildNodes.Params); ChildQuery.SessionName := dmData.qyChildNodes.SessionName; // Session name assigned from existing query. ChildQuery.DatabaseName := dmData.qyChildNodes.DatabaseName; if LastDS = nil then ChildQuery.DataSource := dmData.dsChildNodes else ChildQuery.DataSource := LastDS; ChildQuery.Active := true; end; LastDS := ChildDataSource; end; |
Wed, May 9 2007 3:06 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Richard
I presume this is a simple typo ChildQuery := TQuery.Create(Self); Roy Lambert |
Wed, May 9 2007 5:36 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Richard,
<< I wish to create a query at runtime. When the program attempt to open the query, the error "Invalid session name sesTest" occurs. I reckon the the session exists, but ElevateDB disagrees. The session name is copied from an existing query. >> See Roy's response - it looks like you're creating a TQuery, not a TEDBQuery. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, May 9 2007 6:14 PM | Permanent Link |
Richard Harding | Thanks Roy & Tim.
I spent a LONG time trying to work this out . . . Richard . . . |
Thu, May 10 2007 5:41 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Richard
Sometimes you're just to close to the problem. Next time walk at least 20ft away from the screen and then look Roy Lambert |
This web page was last updated on Monday, May 6, 2024 at 03:23 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |