Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 6 of 6 total |
creating new databases |
Tue, May 29 2007 11:48 AM | Permanent Link |
"Harry de Boer" | LS
In my app's mainform I use code (see below) to set the global engine's configpath and the login for the default session. I place an editbox on the form and in an event I want to create the new database (with the name of the value in the editbox) under the app's directory. I want to check if that db exists with if edtDB.Text <> '' then begin with EDBquery do begin SQL.Text:='SELECT * FROM Cofiguration.Databases WHERE Name = '+ QuotedStr(edtDB.Text); Open; I'm getting a "Database does not exixt" error. Well that is correct of course, but I just expected the recordcount to be 0 What;'s the proper way of doing this. I read the examples code but I can't figure it out. Dbisamitis? Who knows Regards, Harry procedure TfrmMain.FormCreate(Sender: TObject); var Session: TEDBSession; begin inherited; Session := Engine.FindSession('Default'); if Assigned(Session) then begin Session.LoginUser := 'Administrator'; Session.LoginPassword := 'EDBDefault'; end; with Engine do begin ConfigPath:=ExtractFilePath(Application.ExeName); TempTablesPath:=GetTempTablesPath; end; end; |
Tue, May 29 2007 1:52 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Harry
Bit of experimentation in EDBMan SELECT * FROM Cofiguration.Databases WHERE Name ='xxx' works if a database is already selected SELECT * FROM Databases WHERE Name ='xxx' works if you're at the session sql so my guess is that you've already set the database at the query component and you need to remove the configuration. Seems like a buglet to me but there might be a good reason for it. Roy Lambert |
Tue, May 29 2007 3:16 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Harry,
<< if edtDB.Text <> '' then begin with EDBquery do begin SQL.Text:='SELECT * FROM Cofiguration.Databases WHERE Name = '+ QuotedStr(edtDB.Text); Open; >> Are you actually using the name "Cofiguration", or is that a typo ? -- Tim Young Elevate Software www.elevatesoft.com |
Wed, May 30 2007 4:42 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Isn't it amazing how good humans are at pattern recognition Roy Lambert |
Wed, May 30 2007 8:18 AM | Permanent Link |
"Harry de Boer" | Tim,
> Are you actually using the name "Cofiguration", or is that a typo ? ..... shame on me! There's more then the eye meets, but in this case the eye wasn't enough itself Regards, Harry "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> schreef in bericht news:102022EF-7993-493A-A7D4-88D1D1E1FE5B@news.elevatesoft.com... > Harry, > > << if edtDB.Text <> '' then begin > with EDBquery do begin > SQL.Text:='SELECT * FROM Cofiguration.Databases WHERE Name = '+ > QuotedStr(edtDB.Text); > Open; >> > > Are you actually using the name "Cofiguration", or is that a typo ? > > -- > Tim Young > Elevate Software > www.elevatesoft.com > > |
Wed, May 30 2007 1:09 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Isn't it amazing how good humans are at pattern recognition >> Yeah, it's usually me that is posting code that is missing a character or two. -- 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 |