Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Creating a Database record for DBServer in Code
Tue, Aug 14 2007 10:46 AMPermanent Link

"Bobby Gallagher"
Hi

I have the following situation using Delphi 7 and DBISAM 3.30

An application the is designed to run in c/s mode with the following data
scenario

All users need to be able to view/update a set of tables that contain
information to be used in general within the system i.e. Global Contact list
etc

Each user can set up individual projects within the system - each project
should be available to all users.  Each project however has its own set of
data tables stored in a sub folder of the project folder.

Typical folder setup is

d:\MainData\ - holds all the Global tables i.e. Global Contacts lists etc

d:\Projects\Project1\data
d:\Projects\Project2\data
d:\Projects\Project3\data etc

I can set up the maindata location using SrvAdmin.exe but the projects data
locations need to be setup as users create new projects within the system.
Can I create these records in the DBISAM DBServer with code?

Regards

Bobby

Tue, Aug 14 2007 12:49 PMPermanent Link

"Iztok Lajovic"
Bobby,

I have the same folder structure applied in all my applications without need
to modify DBISAM DBServer code. In every application there are two
DBISAMDatabase components: first is global one, DBGlobal, pointing to
directory with global tables, and second is DBProject pointing to directory
of  project which belongs to user who runs the application.

You need to programatically create a user's project directory if it does not
exist, assign DBProject.directory to that directory, create tables using
procedure table.createTable (or using SQL) if tables not exist and that it
is. The same you have to do with global database component. There is a
difference assigning directory to DBProject component in local and C/S
environment, of course, but you can put this assignment in one procedure
dealing with it. How to do this is described very good in manual (at least
in manual for version 4).

HTH
Iztok Lajovic
KreS, Kreativni sistemi


"Bobby Gallagher" <bobgal@computech.ie> je napisal v sporočilo
news:70996295-DC2A-4106-BDD0-22185DC84727@news.elevatesoft.com ...
> Hi
>
> I have the following situation using Delphi 7 and DBISAM 3.30
>
> An application the is designed to run in c/s mode with the following data
> scenario
>
> All users need to be able to view/update a set of tables that contain
> information to be used in general within the system i.e. Global Contact
> list etc
>
> Each user can set up individual projects within the system - each project
> should be available to all users.  Each project however has its own set of
> data tables stored in a sub folder of the project folder.
>
> Typical folder setup is
>
> d:\MainData\ - holds all the Global tables i.e. Global Contacts lists etc
>
> d:\Projects\Project1\data
> d:\Projects\Project2\data
> d:\Projects\Project3\data etc
>
> I can set up the maindata location using SrvAdmin.exe but the projects
> data locations need to be setup as users create new projects within the
> system. Can I create these records in the DBISAM DBServer with code?
>
> Regards
>
> Bobby
>
>

Tue, Aug 14 2007 4:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bobby,

<< I can set up the maindata location using SrvAdmin.exe but the projects
data locations need to be setup as users create new projects within the
system. Can I create these records in the DBISAM DBServer with code? >>

Yes, but you must use an admin connection to do so.  Use this method to get
the existing database path:

http://www.elevatesoft.com/dbisam4d7_tdbisamsession_getremotedatabase.htm

and then use this method to add the new database:

http://www.elevatesoft.com/dbisam4d7_tdbisamsession_addremotedatabase.htm

(Above is V4, but the syntax is the same as with V3).

--
Tim Young
Elevate Software
www.elevatesoft.com



Tue, Aug 14 2007 5:12 PMPermanent Link

"Bobby Gallagher"
Thanks Iztok

I currently do exactly what you suggest but this requires me to use file
sharing for the database location and I note that this will cause a slow
down when more than 1 user logs on.  I want to use a DBISAM DBServer instead
and so need to be able to create new database names, paths etc as the user
creates new projects.

Tim's answer below is what I need to do this.  Thanks for the help

Regards

Bobby

"Iztok Lajovic" <iztok.lajovic@amis.net> wrote in message
news:9B81755C-6B8A-4525-87D4-721BBBAFEBD3@news.elevatesoft.com...
> Bobby,
>
> I have the same folder structure applied in all my applications without
> need to modify DBISAM DBServer code. In every application there are two
> DBISAMDatabase components: first is global one, DBGlobal, pointing to
> directory with global tables, and second is DBProject pointing to
> directory of  project which belongs to user who runs the application.
>
> You need to programatically create a user's project directory if it does
> not exist, assign DBProject.directory to that directory, create tables
> using procedure table.createTable (or using SQL) if tables not exist and
> that it is. The same you have to do with global database component. There
> is a difference assigning directory to DBProject component in local and
> C/S environment, of course, but you can put this assignment in one
> procedure dealing with it. How to do this is described very good in manual
> (at least in manual for version 4).
>
> HTH
> Iztok Lajovic
> KreS, Kreativni sistemi
>
>
> "Bobby Gallagher" <bobgal@computech.ie> je napisal v sporočilo
> news:70996295-DC2A-4106-BDD0-22185DC84727@news.elevatesoft.com ...
>> Hi
>>
>> I have the following situation using Delphi 7 and DBISAM 3.30
>>
>> An application the is designed to run in c/s mode with the following data
>> scenario
>>
>> All users need to be able to view/update a set of tables that contain
>> information to be used in general within the system i.e. Global Contact
>> list etc
>>
>> Each user can set up individual projects within the system - each project
>> should be available to all users.  Each project however has its own set
>> of data tables stored in a sub folder of the project folder.
>>
>> Typical folder setup is
>>
>> d:\MainData\ - holds all the Global tables i.e. Global Contacts lists etc
>>
>> d:\Projects\Project1\data
>> d:\Projects\Project2\data
>> d:\Projects\Project3\data etc
>>
>> I can set up the maindata location using SrvAdmin.exe but the projects
>> data locations need to be setup as users create new projects within the
>> system. Can I create these records in the DBISAM DBServer with code?
>>
>> Regards
>>
>> Bobby
>>
>>
>
>

Tue, Aug 14 2007 5:13 PMPermanent Link

"Bobby Gallagher"
Thanks Tim

Regards

Bobby

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:CC3B9B4E-7F8E-4209-938F-5CD213A7CDF5@news.elevatesoft.com...
> Bobby,
>
> << I can set up the maindata location using SrvAdmin.exe but the projects
> data locations need to be setup as users create new projects within the
> system. Can I create these records in the DBISAM DBServer with code? >>
>
> Yes, but you must use an admin connection to do so.  Use this method to
> get the existing database path:
>
> http://www.elevatesoft.com/dbisam4d7_tdbisamsession_getremotedatabase.htm
>
> and then use this method to add the new database:
>
> http://www.elevatesoft.com/dbisam4d7_tdbisamsession_addremotedatabase.htm
>
> (Above is V4, but the syntax is the same as with V3).
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>
>
>

Image