Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 23 total
Thread setting up a local application
Thu, May 3 2007 7:58 AMPermanent Link

"Harry de Boer"
Tim,

We (Staaf Automatisering) ordered EDB last weekend. We believe it will be as
great for us (did a lot of sql testing) as is/was dbIsam (we're using 3.3.
in conjunction with kbmmw and it never let us down).

Just began to test with the VCL comps. Maybe lack to the incomplete docs
(they're growing each time I have lookSmileor my not understanding completely
how it works because I'm still 'thinking dbIsam' I tried to setup a local
app but cannot seem to get it to work.

1) I tried to set in the configpath property the value '.\' or '..\' and
putting the edbconfig.edbcfg in the application dir. I get an error that the
database does not exists. What's the proper way to set this up (we don't
know the directory structure at clients site, so I thought the appdir would
be the best.

2) If I use the 'default' session the login window always appears. If I
change autosessionname to true the login window doesnot appear. Can I not
use the default session in that way?

Regards, Harry

Thu, May 3 2007 8:58 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Harry

There is a tutorial on the website (might also be in the downloaded docs) and there are a few demo apps - look at the cd collection one.

1. Done use relative paths. If the data directory is in a known relationship to the app directory use Application.ExeName to get the app directory and add the extra bits on. If you are storing the configuration in the apps directory (which is what I think most people will do) the configpath needs setting in the engine to point to it.

2. You need to supply login details to whichever session you use so if you're using the default you need to set them up in there before opening any tables.

It is very different to the way DBISAM works and I'm only just getting used to it myself.


Roy Lambert
Thu, May 3 2007 10:47 AMPermanent Link

"Harry de Boer"
Roy

> 1. Done use relative paths. If the data directory is in a known
relationship to the app directory use Application.ExeName to get the app
directory and add the extra bits on.

Mmm.. I guess the Application.Exename is the way to go then, because that
would be the kbmmw driven middleware server. We have a lot of customers that
use this middlewareapp/database on their server. We want the software and
database delivered together withan ini file that stores the dir info. As I
understand the EDBconfig file contains  info of all the databases (initially
on our developer system). However, I only want the EDBconfig to contain
their database. Must I -and can I, and how?- use different EDBconfig files
then (If I change the settings in EDBmngr, I don't see my databases anymore:
must I create them all over again for each configuration?

> 2. You need to supply login details to whichever session you use so if
you're using the default you need to set them up in  there before opening
any tables.

I did set them up in the component, but I don't want the login dialog
appear.

> It is very different to the way DBISAM works and I'm only just getting
used to it myself.

Indeed it is! Well, I guess every change comes with a tag. A bit of stydying
wouldn't do me harm Smile

Regards, Harry


"Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht
news:909B7B7B-2639-44DF-8C74-10B2219080EC@news.elevatesoft.com...
> Harry
>
> There is a tutorial on the website (might also be in the downloaded docs)
and there are a few demo apps - look at the cd collection one.
>
> 1. Done use relative paths. If the data directory is in a known
relationship to the app directory use Application.ExeName to get the app
directory and add the extra bits on. If you are storing the configuration in
the apps directory (which is what I think most people will do) the
configpath needs setting in the engine to point to it.
>
> 2. You need to supply login details to whichever session you use so if
you're using the default you need to set them up in there before opening any
tables.
>
> It is very different to the way DBISAM works and I'm only just getting
used to it myself.
>
>
> Roy Lambert
>

Thu, May 3 2007 11:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Harry

>We want the software and
>database delivered together withan ini file that stores the dir info. As I
>understand the EDBconfig file contains info of all the databases (initially
>on our developer system). However, I only want the EDBconfig to contain
>their database. Must I -and can I, and how?- use different EDBconfig files
>then (If I change the settings in EDBmngr, I don't see my databases anymore:
>must I create them all over again for each configuration?

At this point I think almost all of us are novices Smileyand I for one am still unclear in my own mind about the relationship configuration/catalog/database/table/data.

There is a diagram in the edb1b2006.pdf manual but it shows a simple 1-1 relationship so it doesn't really lessen the  confusion.

Looking at the one project I have going with ElevateDB so far what you'll need to ship is EDBDatabase.EDBCat file which lives with the data in its directory (at least in my case).

This I think is the bit of code that creates the catalog and my database.

with mymEngine do begin
 ConfigPath := ExtractFilePath(Application.ExeName);
 TempTablesPath := GetTempTablesPath; <<< gets the Windows Temp path
 Active := True;
end;
DataLocation := ExtractFilePath(Application.ExeName) + 'Info';
ForceDirectories(DataLocation);
MyMSession.Connected := True;
with ConfigurationQuery do begin
 SQL.Text := 'SELECT * FROM Databases WHERE Name=' + Engine.QuotedSQLStr('MyMDB');
 Open;
 if (RecordCount = 0) then begin
  Close;
  SQL.Text := 'CREATE DATABASE "MyMDB" PATH ' + Engine.QuotedSQLStr(DataLocation);
  ExecSQL;
 end else Close;
end;

I think if the EDBDatabase.EDBCat is in a pre-existing director and that's used as DataLocation I'm pretty sure the tables will be recognised. One thing that baffled me a LOT is that the data files will NOT be created until you .open the tables.

HTH

Roy Lambert
Thu, May 3 2007 1:21 PMPermanent Link

"Royke"
"Harry de Boer" <harry@staaf.nl> wrote in message
news:A47C1D75-DDC7-4EF5-9569-9BBDD0E19A93@news.elevatesoft.com...
> Tim,
>
> We (Staaf Automatisering) ordered EDB last weekend. We believe it will be
> as
> great for us (did a lot of sql testing) as is/was dbIsam (we're using 3.3.
> in conjunction with kbmmw and it never let us down).
>
> Just began to test with the VCL comps. Maybe lack to the incomplete docs
> (they're growing each time I have lookSmile

Where do you go to take that look, Harry? I could not find Help updates in
the Customer area.

Roy

===========


or my not understanding completely
> how it works because I'm still 'thinking dbIsam' I tried to setup a local
> app but cannot seem to get it to work.
>
> 1) I tried to set in the configpath property the value '.\' or '..\' and
> putting the edbconfig.edbcfg in the application dir. I get an error that
> the
> database does not exists. What's the proper way to set this up (we don't
> know the directory structure at clients site, so I thought the appdir
> would
> be the best.
>
> 2) If I use the 'default' session the login window always appears. If I
> change autosessionname to true the login window doesnot appear. Can I not
> use the default session in that way?
>
> Regards, Harry
>
>

Thu, May 3 2007 4:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Harry,

<< 1) I tried to set in the configpath property the value '.\' or '..\' and
putting the edbconfig.edbcfg in the application dir. I get an error that the
database does not exists. What's the proper way to set this up (we don't
know the directory structure at clients site, so I thought the appdir would
be the best. >>

As Roy indicated, use full path names to ensure that you are using the
correct config file and not relying on being in a certain working directory
at all times.

<< 2) If I use the 'default' session the login window always appears. If I
change autosessionname to true the login window doesnot appear. Can I not
use the default session in that way? >>

Are you setting AutoSessionName to True for the default session ?  If so,
then don't do that.  AutoSessionName is only for explicit sessions used on a
form or data module.

Also, are you saying that you are able to login without entering a user
ID/password if you set AutoSessionName=True ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 3 2007 4:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Harry,

<< As I understand the EDBconfig file contains  info of all the databases
(initially on our developer system). However, I only want the EDBconfig to
contain their database. Must I -and can I, and how?- use different EDBconfig
files then (If I change the settings in EDBmngr, I don't see my databases
anymore: must I create them all over again for each configuration? >>

I would always recommend *not* shipping a config file with the application,
but rather creating the databases, users, roles, jobs, etc. as necessary.
That way you can be sure that the databases are set up with the correct
paths for the target system.  If you look at the CDCollector example
application, you will see how we create the necessary database on the fly
using the CREATE DATABASE statement.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 3 2007 4:12 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< There is a diagram in the edb1b2006.pdf manual but it shows a simple 1-1
relationship so it doesn't really lessen the confusion. >>

I kind of ran low on space, and bitmaps can't span multiple pages in the
PDFs. Smiley

The relationship is this:

Configuration
|
---- Database Definition / Path ----------------------> Database -> Catalog
|
---- Database Definition / Path ----------------------> Database -> Catalog
|
---- Database Definition / Path ----------------------> Database -> Catalog

etc.

<< I think if the EDBDatabase.EDBCat is in a pre-existing director and
that's used as DataLocation I'm pretty sure the tables will be recognised.
>>

Yes, they will.

<< One thing that baffled me a LOT is that the data files will NOT be
created until you .open the tables. >>

This is true for all files used by ElevateDB (config, catalog, table).  The
reason is that ElevateDB does not base the existence of these things on
whether there are files present for them.  Their existence is determined by
logical means, and the files are just the manifestation of these logical
constructs.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 3 2007 4:22 PMPermanent Link

"Harry de Boer"
Roy,

Maybe I don't look very frequently and it seems that it is so (however not
for the VCL stuff, you're right there).

Regards, Harry


"Royke" <royke@canada.com> schreef in bericht
news:99ED1857-DA5B-4A22-881E-F05A56678866@news.elevatesoft.com...
> "Harry de Boer" <harry@staaf.nl> wrote in message
> news:A47C1D75-DDC7-4EF5-9569-9BBDD0E19A93@news.elevatesoft.com...
> > Tim,
> >
> > We (Staaf Automatisering) ordered EDB last weekend. We believe it will
be
> > as
> > great for us (did a lot of sql testing) as is/was dbIsam (we're using
3.3.
> > in conjunction with kbmmw and it never let us down).
> >
> > Just began to test with the VCL comps. Maybe lack to the incomplete docs
> > (they're growing each time I have lookSmile
>
> Where do you go to take that look, Harry? I could not find Help updates in
> the Customer area.
>
> Roy
>
> ===========
>
>
> or my not understanding completely
> > how it works because I'm still 'thinking dbIsam' I tried to setup a
local
> > app but cannot seem to get it to work.
> >
> > 1) I tried to set in the configpath property the value '.\' or '..\' and
> > putting the edbconfig.edbcfg in the application dir. I get an error that
> > the
> > database does not exists. What's the proper way to set this up (we don't
> > know the directory structure at clients site, so I thought the appdir
> > would
> > be the best.
> >
> > 2) If I use the 'default' session the login window always appears. If I
> > change autosessionname to true the login window doesnot appear. Can I
not
> > use the default session in that way?
> >
> > Regards, Harry
> >
> >
>
>

Thu, May 3 2007 4:33 PMPermanent Link

"Harry de Boer"
Tim,

We do a lot of conversion stuff from other db's (complete other structures,
sometimes complete handcoded conversion routines) to the db for our app. We
do that inhouse and then send the files (client and server (middleware)app
and the datafiles together with a config file that they can change for
proper setting/paths. We really don't want to do the conversions at
customer's sites, so building the db as part of the app is not the best
suited solution for us I guess. Any recommedations how to tackle this (in
another way)?

Regards, Harry

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> schreef in bericht
news:7C3072E3-287C-4D58-92B2-BE8C67E06E7B@news.elevatesoft.com...
> Harry,
>
> << As I understand the EDBconfig file contains  info of all the databases
> (initially on our developer system). However, I only want the EDBconfig to
> contain their database. Must I -and can I, and how?- use different
EDBconfig
> files then (If I change the settings in EDBmngr, I don't see my databases
> anymore: must I create them all over again for each configuration? >>
>
> I would always recommend *not* shipping a config file with the
application,
> but rather creating the databases, users, roles, jobs, etc. as necessary.
> That way you can be sure that the databases are set up with the correct
> paths for the target system.  If you look at the CDCollector example
> application, you will see how we create the necessary database on the fly
> using the CREATE DATABASE statement.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Page 1 of 3Next Page »
Jump to Page:  1 2 3
Image