![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
| Messages 1 to 5 of 5 total |
| 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 | 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. | 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 | 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, July 6, 2026 at 01:41 PM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

