Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Session Configuration Files
Sun, Nov 9 2008 1:45 PMPermanent Link

"Terry Swiers"
Hi All,

Got a question regarding session configuration files.  In my application, I
use at least 2 sessions and sometimes 3 because each session may be pointing
to a different database server.  I was hoping to use just a single
configuration file to create and update the database entries in and share
them across all 3 of the sessions.  This wouldn't be a problem if the
entries were static, but I need to be able to alter existing or add new
database entries at runtime and EDB won't let me do this if it doesn't have
exclusive access to the configuration file.

Do I need to maintain a separate configuration file for each session if they
are going to change at runtime or am I missing something simple?

--

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------

Sun, Nov 9 2008 7:39 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Terry,

I'm not sure if I understood your design; are you using Client/Server or
File-Sharing mode? If you are using C/S, each database server has it's
own configuration file and applications will not have direct access to
the configuration file - only the server. Each configuration file should
contain the configuration for the databases located in the corresponding
server. If you are using file-sharing mode, then you can share the
configuration file - you may have one configuration file for all
databases, no mater where they are located, as long as the configuration
file is accessible from all sessions.

--
Fernando Dias
[Team Elevate]
Mon, Nov 10 2008 1:10 AMPermanent Link

"Terry Swiers"
Fernando,

Thank you for the response.  Especially on the weekend.

> I'm not sure if I understood your design; are you using Client/Server or
> File-Sharing mode?

I'll try and explain a bit more on the detail.

First of all, I'm dealing with the local configuration files for the EDB
session components.  The configuration files for the server are not an issue
here as I fully understand these and have no problems with changing the
defined databases within those.  As for the connection, any of the 3 could
be either a F/S or a C/S session but for the sake of discussion we'll just
assume that this is all F/S.

Because our application can have multiple databases, we use two main
sessions.  The first session points to a database that contains common
information across all of the actual databases.  This includes report
templates, shared files, and information on how to connect to the actual
data that the application uses.  The second session points to the actual
data.

And because we can also transfer information between databases, we also have
a temporary third session that may point to a 3rd database in order to move
data back to the second session.

> If you are using C/S, each database server has it's own configuration file
> and applications will not have direct access to the configuration file -
> only the server. Each configuration file should contain the configuration
> for the databases located in the corresponding server. If you are using
> file-sharing mode, then you can share the configuration file - you may
> have one configuration file for all databases, no mater where they are
> located, as long as the configuration file is accessible from all
> sessions.

What I'm not entirely sure about at this point is if I need to have a
separate configuration file for each of the sessions since any one of them
change to point to a different database during normal operation of the
application.  So if Session A is pointing to \\server\data1 and Session B is
pointing to \\server\data2, if I share the same configuration file I can't
create a new database entry in the local configuration file to point to
\\server\data3 because I don't have exclusive rights to the shared
configuration file.

Now if every possible data location was already in the local configration
file, I could just point the session to the correct location.  But in some
instances I need to create a new entry or change an existing entry within
the configuration file and run into the exclusive rights issue.

Am I missing something or do I really need to have separate configuration
files for each session if both are going to be connected at the same time
and the location of the database might change for either one of them?

--

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------



Mon, Nov 10 2008 8:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Terry


From what I read here I'm guessing your brain is operating in  DBISAM style Smiley

Unless I'm wrong (Tim will let us know I'm sure) you only need one configuration file and one session but several databases (sort of  = catalogs).

Look in the sql pdf manual at section 4.2 the configuration tables - this tells you what the configuration files hold. In your case the important bit is Database tables.

There are then the catalog files which maintain a list of tables etc in the database.

The session isn't anything physical and is best thought of as an isolator. You can share data between databases but you cannot share data between sessions (at least I don't think you can) at least using sql.


Roy Lambert [Team Elevate]
Mon, Nov 10 2008 11:04 AMPermanent Link

"Terry Swiers"
Roy,

> From what I read here I'm guessing your brain is operating in DBISAM style
> Smiley

Absolutely correct.

> Unless I'm wrong (Tim will let us know I'm sure) you only need one
> configuration file and one session but several databases (sort of =
> catalogs).

This is where things get confusing.  If the end use is using C/S
connections, how can I use one session so that I'm using one configuration
file for the application and still connect to two different databases on two
physically different EDB servers?

--

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------

Mon, Nov 10 2008 11:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Terry

>This is where things get confusing. If the end use is using C/S
>connections, how can I use one session so that I'm using one configuration
>file for the application and still connect to two different databases on two
>physically different EDB servers?

Woops - I missed that bit.

That is much more tricky (I think). Firstly, if there's a common location both the servers can point at stuff the configuration file there.

In the TEDBSession you can set the path to where the configuration file is BUT (especially since I use f/s not c/s) I can't see a way to get the single session to point to two different RemoteAddresses. But if each server has access to all the databases that wouldn't be a problem each instance of the app would just use one server.

Why are you splitting things in that way?

Roy Lambert [Team Elevate]
Mon, Nov 10 2008 11:54 AMPermanent Link

"Terry Swiers"
Roy,

> Why are you splitting things in that way?

Because the different databases usually represent physically different
locations, and can be in different parts of the world.  Having a separate
database holding the connection information for the other databases allows
for the connection information of all the locations to be maintained in one
place rather than having to update each of the workstations.  If a server is
moved or the connection information changes, you make one update to update
all 50 of the users.  Or in the case of setting up a new workstation,  all
that has to be done is configure the connection to the one common database
and then select the actual data database from a selection list.

--

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------

Mon, Nov 10 2008 12:15 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Terry


I think I can see a way to do it with f/s or with c/s but I'm not sure about the mixed environment with both f/s and c/s where you will need to use two sessions.

Do you use much sql to update tables or make a lot of use of triggers, views and stored procedure, or do you intend to?

Roy Lambert [Team Elevate]
Mon, Nov 10 2008 1:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Terry,

<< This is where things get confusing.  If the end use is using C/S
connections, how can I use one session so that I'm using one configuration
file for the application and still connect to two different databases on two
physically different EDB servers? >>

You wouldn't in this case.  In such a case, you would have two different
configuration files and would use two different sessions to connect to each
configuration.  If doing so from the same application, you would set the
TEDBEngine.UseLocalSessionEngineSettings to True and set the configuration
path, etc. for each local TEDBSession that you're using.

The only thing that EDB does *not* allow is to have multiple configuration
files pointing to the *same* database.  You can have multiple configuration
files pointing to multiple databases.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Nov 10 2008 1:19 PMPermanent Link

"Terry Swiers"
Roy,

> Do you use much sql to update tables or make a lot of use of triggers,
> views and stored procedure, or do you intend to?

Not yet, but as we continue with converting the application over to EDB we
will use these extensively.

--

---------------------------------------
 Terry Swiers
 Millennium Software, LLC
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------

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