Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread newbie- getting stuck on local application tutorial (with delphi 2009)
Tue, Nov 17 2009 2:21 PMPermanent Link

Howard
Experienced delphi/database programmer but new to elevate db.

Several times I've gone through this iteration with the same (null) result!.

I've followed the Local Application Tutorial to the letter and created the database (page
5). Into Delphi (section 1.2) and added the engine object OK and typed in the config path.
Added the session object OK with the given logon & pw.  Added the database object  but on
reaching step 9 there is nothing in the drop down box from which to select the tutorial
database. Hence the rest fails as delphi does not know which database to use.

Where am I going wrong? The session connects to the engine but the database will not
connect to the session. (The server is running).

One difficulty I have in following the tutorial is that it is not clear which properties
are simply text strings that can be anything instead of 'tutorial' or 'tutorialdb' and
which must refer to the names of previously created objects.  

Can anyone help as I feel stupid that I cannot get this to work after seeing so many good
recommendations fo this db server.

Howard
Tue, Nov 17 2009 6:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Howard,

<< I've followed the Local Application Tutorial to the letter and created
the database (page 5). Into Delphi (section 1.2) and added the engine object
OK and typed in the config path. Added the session object OK with the given
logon & pw.  Added the database object  but on reaching step 9 there is
nothing in the drop down box from which to select the tutorial database.
Hence the rest fails as delphi does not know which database to use. >>

You need to make sure that you set the TEDBDatabase.SessionName so that it
refers to the SessionName assigned to the TEDBSession in the earlier steps.
This is usually the cause of not being able to "see" any databases in the
TEDBDatabase.Database drop-down property editor.

<< One difficulty I have in following the tutorial is that it is not clear
which properties are simply text strings that can be anything instead of
'tutorial' or 'tutorialdb' and which must refer to the names of previously
created objects. >>

Anything with the "Name" suffix is a textual name that is used only for
identification purposes in your application, i.e. TEDBSession.SessionName,
TEDBDatabase.SessionName, TEDBDatabase.DatabaseName, etc.

The relationships between these are documented here:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2&product=d&version=7&category=3&topic=1

To summarize them:

TEDBSession.SessionName -> User-defined session name

TEDBDatabase.SessionName -> Points to an existing TEDBSession.SessionName,
or blank/"default" for the default session

TEDBDatabase.DatabaseName -> User-defined database name

TEDBTable/Query/Script/StoredProc.SessionName -> Points to an existing
TEDBSession.SessionName, or blank/"default" for the default session

TEDBTable/Query/Script/StoredProc.DatabaseName -> Points to an existing
TEDBDatabase.DatabaseName

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Nov 18 2009 2:26 PMPermanent Link

Howard



"Tim Young [Elevate Software]" wrote:

Howard,

<< I've followed the Local Application Tutorial to the letter and created
the database (page 5). Into Delphi (section 1.2) and added the engine object
OK and typed in the config path. Added the session object OK with the given
logon & pw.  Added the database object  but on reaching step 9 there is
nothing in the drop down box from which to select the tutorial database.
Hence the rest fails as delphi does not know which database to use. >>

You need to make sure that you set the TEDBDatabase.SessionName so that it
refers to the SessionName assigned to the TEDBSession in the earlier steps.
This is usually the cause of not being able to "see" any databases in the
TEDBDatabase.Database drop-down property editor.

<< One difficulty I have in following the tutorial is that it is not clear
which properties are simply text strings that can be anything instead of
'tutorial' or 'tutorialdb' and which must refer to the names of previously
created objects. >>

Anything with the "Name" suffix is a textual name that is used only for
identification purposes in your application, i.e. TEDBSession.SessionName,
TEDBDatabase.SessionName, TEDBDatabase.DatabaseName, etc.

The relationships between these are documented here:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2&product=d&version=7&category=3&topic=1

To summarize them:

TEDBSession.SessionName -> User-defined session name

TEDBDatabase.SessionName -> Points to an existing TEDBSession.SessionName,
or blank/"default" for the default session

TEDBDatabase.DatabaseName -> User-defined database name

TEDBTable/Query/Script/StoredProc.SessionName -> Points to an existing
TEDBSession.SessionName, or blank/"default" for the default session

TEDBTable/Query/Script/StoredProc.DatabaseName -> Points to an existing
TEDBDatabase.DatabaseName

--
Tim Young
Elevate Software
www.elevatesoft.com


Thank you Tim,
I have the following after going through the instructions in the user guide.
Can you see where the link is broken? I can't.

(The ElevateDB server says its running and says the config folder is c:\tutorial
The elevateDB manager shows one row in the 'customer' table in the 'Tutorial' database)

Delphi has the following objects


EDBEngine.name = EDBEngine1
EDBEngine.ConfigPath = C:\tutorial
EDBEngine.Active = true

EDBSession1.Name = EDBSession1
EDBSession1.SessionName = TUTORIAL
EDBSession1.LocalConfigPath = C:\tutorial
EDBSession1.user = Administrator
EDBSession1.password = EBDDefault

EDBDatabase1.name = EDBDataBase1
EDBDatabase1.SessionName = TUTORIAL
EDBDatabase1.DatabaseName = tutorialDB
EDBDatabase1.Databse = tutorial

EDBTable1.name = EDBTable1
EDBTable1.SessionName = TUTORIAL
EDBTable1.DatabaseName= tutorialDB
EDBTable1.table = customer

DataSource1.name = Datasource1
DataSource1.DataSet = EDBTable1

DBGrid1.Datasource = Datasource1




regards Howard
Fri, Nov 20 2009 2:18 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Howard,

<< I have the following after going through the instructions in the user
guide.  Can you see where the link is broken? I can't. >>

Nope, but if you post the actual .dfm and .pas for the form, I can tell you
where the problem is.

<< (The ElevateDB server says its running and says the config folder is
c:\tutorial
The elevateDB manager shows one row in the 'customer' table in the
'Tutorial' database) >>

Are you trying to connect to the ElevateDB Server with a remote session, or
are you trying to use a local session to connect directly to the database ?
The TEDBSession.SessionType property controls this aspect of operation.

Also, the TEDBSession.Local* properties are only valid when the
TEDBEngine.UseLocalSessionEngineSettings property is set to True:

http://www.elevatesoft.com/manual?action=mancompprop&id=edb2&product=d&version=7&comp=TEDBEngine&prop=UseLocalSessionEngineSettings

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Dec 5 2009 1:39 PMPermanent Link

Howard
"Tim Young [Elevate Software]" wrote:

Howard,

<< I have the following after going through the instructions in the user
guide.  Can you see where the link is broken? I can't. >>

Nope, but if you post the actual .dfm and .pas for the form, I can tell you
where the problem is.

<< (The ElevateDB server says its running and says the config folder is
c:\tutorial
The elevateDB manager shows one row in the 'customer' table in the
'Tutorial' database) >>

Are you trying to connect to the ElevateDB Server with a remote session, or
are you trying to use a local session to connect directly to the database ?
The TEDBSession.SessionType property controls this aspect of operation.

Also, the TEDBSession.Local* properties are only valid when the
TEDBEngine.UseLocalSessionEngineSettings property is set to True:

http://www.elevatesoft.com/manual?action=mancompprop&id=edb2&product=d&version=7&comp=TEDBEngine&#8733;=UseLocalSessionEngineSettings

--
Tim Young
Elevate Software
www.elevatesoft.com

Below are the two files. Note the value of EDBdatabase.database (ie tutorial) was typed in
by hand as nothing showed in the drop down box. Thats where I am getting stuck in the
tuitorial. The tutorial database is installed in the default place - I assume as I simply
followed the tutorial - there is a folder called C:\tutorial, inside that is one called
DB. both have files in.

The TEDBSession.SessionType property is set to stLocal (I didn't change it and would not
know the difference between a local or a remote session anyway!) - in my application, if I
ever get it started, the database is likely to be on a server but I wanted to learn how to
use elevate's components first. - I'm attempting to convert a large MS access front &
backend database application that I wrote into Delphi / elevate so need to understand how
to use elevate. I'm happy with delphi.   

I noted that however that the TEDBEngine.UseLocalSessionEngineSettings property defaults
to false (the tutorial didn't say anything about changing this so I left it as it was). So
I deleted all the componets and started again, chaging this to true before adding the
session but there was still nothing to select in the EDBdatabase.database dropdown when I
got to that point (step 8 in the tutiorial here

http://www.elevatesoft.com/manual?action=mantopic&id=edb2&product=r&version=2009&category=0&topic=2

Unfortunately none of the example programs seem to duplicate the tutorial exactly.

I must say I'm getting a bit frustrated with all this. I am very experienced in Delphi for
writing scientific programs and in MS Access for databases. However I've yet to see the
'Rapid Application Development' promised when I try to put the two together. Any help you
can give would be most welcome.

Howard



the .dfm looks like this (except that iI have now

object Form1: TForm1
 Left = 0
 Top = 0
 Caption = 'Form1'
 ClientHeight = 294
 ClientWidth = 390
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
 object EDBEngine1: TEDBEngine
   Active = True
   EngineType = etClient
   UseLocalSessionEngineSettings = True
   Signature = 'edb_signature'
   EncryptionPassword = 'elevatesoft'
   ExclusiveFileAccess = False
   LicensedSessions = 4096
   ConfigPath = 'C:\Tutorial'
   ConfigName = 'EDBConfig'
   ConfigExtension = '.EDBCfg'
   LockExtension = '.EDBLck'
   LogExtension = '.EDBLog'
   MaxLogFileSize = 1048576
   LogCategories = [lcInformation, lcWarning, lcError]
   CatalogName = 'EDBDatabase'
   CatalogExtension = '.EDBCat'
   BackupExtension = '.EDBBkp'
   UpdateExtension = '.EDBUpd'
   TableExtension = '.EDBTbl'
   TableIndexExtension = '.EDBIdx'
   TableBlobExtension = '.EDBBlb'
   TablePublishExtension = '.EDBPbl'
   TempTablesPath = 'C:\DOCUME~1\Howard\LOCALS~1\Temp\'
   ServerName = 'EDBSrvr'
   ServerDescription = 'ElevateDB Server'
   ServerAuthorizedAddresses.Strings = (
     '*')
   Left = 208
   Top = 88
 end
 object EDBSession1: TEDBSession
   Connected = True
   LoginUser = 'Administrator'
   LoginPassword = 'EDBDefault'
   SessionName = 'tutorial'
   LocalSignature = 'edb_signature'
   LocalEncryptionPassword = 'elevatesoft'
   LocalConfigPath = 'C:\Tutorial'
   LocalConfigName = 'EDBConfig'
   LocalConfigExtension = '.EDBCfg'
   LocalLockExtension = '.EDBLck'
   LocalLogExtension = '.EDBLog'
   LocalMaxLogFileSize = 1048576
   LocalLogCategories = [lcInformation, lcWarning, lcError]
   LocalCatalogName = 'EDBDatabase'
   LocalCatalogExtension = '.EDBCat'
   LocalBackupExtension = '.EDBBkp'
   LocalUpdateExtension = '.EDBUpd'
   LocalTableExtension = '.EDBTbl'
   LocalTableIndexExtension = '.EDBIdx'
   LocalTableBlobExtension = '.EDBBlb'
   LocalTablePublishExtension = '.EDBPbl'
   LocalTempTablesPath = 'C:\DOCUME~1\Howard\LOCALS~1\Temp\'
   RemoteSignature = 'edb_signature'
   RemoteEncryptionPassword = 'elevatesoft'
   RemoteAddress = '127.0.0.1'
   Left = 136
   Top = 160
 end
 object EDBDatabase1: TEDBDatabase
   DatabaseName = 'tutorialdb'
   Database = 'tutorial'
   SessionName = 'tutorial'
   Left = 256
   Top = 208
 end
end



and the .pas like this

unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, edbcomps, DB;

type
 TForm1 = class(TForm)
   EDBEngine1: TEDBEngine;
   EDBSession1: TEDBSession;
   EDBDatabase1: TEDBDatabase;
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

implementation

{$R *.dfm}

end.
Sun, Dec 6 2009 9:03 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Howard


What this suggests to me is that either you have the wrong configpath specified or there is no configuration at that location. Have a look for a file named EDBConfig.EDBCfg in c:\tutorial. If its not there then that's your problem.

I'd also recommend loading the cdcollector example that comes with ElevateDB as a good way to start learning. With that you have something that's ready to run on loading and you can examine the state of the various components.

Roy Lambert [Team Elevate]
Sun, Dec 6 2009 3:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Howard,

<< I noted that however that the TEDBEngine.UseLocalSessionEngineSettings
property defaults to false (the tutorial didn't say anything about changing
this so I left it as it was). So I deleted all the componets and started
again, chaging this to true before adding the session but there was still
nothing to select in the EDBdatabase.database dropdown when I got to that
point (step 8 in the tutiorial here  >>

Make sure that you set the TEDBEngine.UseLocalSessionEngineSettings property
is False.  Enabling this property will cause the engine to use the
TEDBSession.Local* properties for the configuration instead of the
TEDBEngine, and the tutorial does not cover that.

If the Tutorial database is not showing up in the list of databases, then it
means that you executed the CREATE DATABASE when the configuration path was
set to a different location.   You need to use the EDB Manager to verify
that the:

1) The configuration path is set to c:\Tutorial for the Default EDB Manager
session

2) The Tutorial database shows up in the list of created databases in the
Explorer treeview on the left under the Default session's Databases node.

Once this is the case, then you should see the Tutorial database show up in
the TEDBDatabase component on your form.  If 2) is not correct, then make
sure to execute the CREATE DATABASE statement again in an SQL window to
create the database.

<< I must say I'm getting a bit frustrated with all this.  >>

I understand, but you must realize that the Tutorial is correct, and does
work, if you follow the steps exactly as described.  It is easy to get
something wrong, no doubt, but that is the nature of what we do. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 27 2010 4:40 PMPermanent Link

Chris Thornton

Thornsoft Development Inc.

Avatar

Same here - maybe better luck tomorrow.  I've  been through the tutorial 3 times, and must keep getting the same thign wrong. Looks good in DB Manager, but I can't hook it up within Delphi (2010, Unicode).
Probably because I had played around with the DB manager prior to running through the tutorial.  I did manage to LOSE a database that I had previously migrated. How do i get that back into the DB manager? I keep thinking I can just open up a table like with DBSys, or mabye I open up a config file?  I'm feeling very lost.
It seems like it should be simpler to point an EDBDatabase object at a directory containing some tables, and just have it "pick it up" from there.  DBISAM was so forgiving in this regard - I think I'm in for a rough stretch.
Thu, May 27 2010 5:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< Same here - maybe better luck tomorrow.  I've  been through the tutorial
3 times, and must keep getting the same thign wrong. Looks good in DB
Manager, but I can't hook it up within Delphi (2010, Unicode). >>

Two things:

1) Make sure that you're using the correct version of the EDB Manager
(ANSI/Unicode) for the version that you're using in Delphi (ANSI/Unicode).

2) Make sure that the TEDBEngine.ConfigPath matches that used for the
session in the EDB Manager.  They must match, or you won't be able to "see"
the databases that you defined in the EDB Manager.

<< Probably because I had played around with the DB manager prior to running
through the tutorial.  I did manage to LOSE a database that I had previously
migrated. How do i get that back into the DB manager? >>

Do a search of your computer for the file name:

EDBConfig.EDBCfg

That is the configuration file name, and will tell you where you created any
configuration files on your system by specifying the containing folder as
the configuration path in an EDB Manager session or the
TEDBEngine.ConfigPath property in your application.  You only want to have
one configuration file per application, so if you have multiple files, then
you've specified different configuration path settings at different times,
and you should pick one path to be *the* configuration path for your
application.

<< I keep thinking I can just open up a table like with DBSys, or mabye I
open up a config file? >>

No, as the tutorial indicates, you simply specify the configuration path,
create the database and table, and then open the table.  The configuration
file, as well as the database catalog file, are created (if not
present)/opened automatically for you by EDB when the session and database
are connected, respectively.

<< It seems like it should be simpler to point an EDBDatabase object at a
directory containing some tables, and just have it "pick it up" from there.
DBISAM was so forgiving in this regard - I think I'm in for a rough stretch.
>>

Of course it's simpler for one-off table opens.  But it lends itself to all
sorts of issues like having to specify directory names in SQL when opening
tables in different database directories and other weird constructs that
don't work well with ODBC drivers and .NET data providers that have to
inter-operate with other end-user applications.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image