Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Local and Remote Session on the same application
Fri, Jan 20 2012 12:41 PMPermanent Link

John Postnikoff

I have a stand alone client application that is used to process orders locally.
At the end of the day, or at any interval for all that matters, orders are sent to the remote server and consolidated on the server from about 50 other locations.

Under DBISAM I used two sets of database components and and two engines in the client application. One to connect locally, and the other set to connect to the remote server,  which when called I could do a simple append using SMI components that worked very well for me from one to the other.

The problem that I foresee here and that I seem to be running into with Elevated DB is that I am risking the corruption of my form data table structure and catalog file if I use more that one database and engine component in the same application. Although I can easily change the session to remote, as I see it, I will lose my local access to my local table to append data to the remote server. I may be missing something here that I am sure is simple.

What is the best way to handle this so I can append data from the local client app to the remote server while keeping tables on the local machine and application active?


John Postnikoff
Fri, Jan 20 2012 12:46 PMPermanent Link

Terry Swiers

John,

> What is the best way to handle this so I can append data from the local
> client app to the remote server while keeping tables on the local machine
> and application active?

Set the UseLocalSessionengineSettings option of the Engine to true.  Then
drop two TEDBSession objects on the form.  You can use one of them for local
and the other for remote and control them independently.   My app uses up to
3 different sessions at the same time for this same type of scenario (1 for
both remote and local, and 1 for a memory session).

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

Atrex Electronic Support Options:
Atrex Knowledgebase: http://support.atrex.com/KB/root.aspx
Email: 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)
---------------------------------------

Fri, Jan 20 2012 12:51 PMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

John,

The best way to handle this is by using the replication shystem
capabilities of ElevateDB. See the technical article on the Elevate
Software website:

http://www.elevatesoft.com/articles?action=view&category=edb&article=bui
lding_sales_quote_replication_system_elevatedb

--
Jan Ferguson [Team Elevate]


John Postnikoff wrote:

> I have a stand alone client application that is used to process
> orders locally.  At the end of the day, or at any interval for all
> that matters, orders are sent to the remote server and consolidated
> on the server from about 50 other locations.
>
> What is the best way to handle this so I can append data from the
> local client app to the remote server while keeping tables on the
> local machine and application active?
Fri, Jan 20 2012 1:22 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

>Under DBISAM I used two sets of database components and and two engines in the client application. One to connect locally, and the other set to connect to the remote server, which when called I could do a simple append using SMI components that worked very well for me from one to the other.

How did that work? AFAIK even with DBISAM its not possible to have two engine components in the same app.

>The problem that I foresee here and that I seem to be running into with Elevated DB is that I am risking the corruption of my form data table structure and catalog file if I use more that one database and engine component in the same application.

That's easily solved - TEDBEngine is a singleton. Two sessions as Terry recommends will work, and there's no risk of messing up the catalog. However, you would have to use table components to do the transfer, or build the sql using the local session to run in the context of the remote session since the sql can't cross a session.

>Although I can easily change the session to remote, as I see it, I will lose my local access to my local table to append data to the remote server. I may be missing something here that I am sure is simple.

As Terry said two session will solve that.

>What is the best way to handle this so I can append data from the local client app to the remote server while keeping tables on the local machine and application active?

I like Jan's idea of using the built in replication/publishing capabilities. If you want to go down that route search for David Cornelius' posts - he's the guru in the area.

Roy Lambert [Team Elevate]
Mon, Jan 23 2012 12:28 AMPermanent Link

John Postnikoff


You are right. Only one engine. I think I added another when I was trying to get things to work, which caused some form corruption, and for some reason Delphi reverted to older forms.

Now I have another problem. For some reason if I try to create a remote database using Elevate DB Manager the remote database will not save, just local databases.. Thus I get a 401 error in my application when I try to connect to a remote session. Once Elevate DB Manager is closed the remote database is longer there or saved when re-opened with Elevate DB Manager. Any idea why the remote database is not saved?

Also, I can only seem to log in with Administrator and the default password even if I create other users with full access.

I am using a remote session and localhost IP address of 127.0.0.1   Delphi 7 and Windows XP.  Sorry I am somewhat lost on this, perhaps if could spend a bit more time it would come easier, or maybe I am stuck on some DBISAM ways.  I appreciate your help to put me in the right direction.

John Postnikoff


Roy Lambert wrote:

John

>Under DBISAM I used two sets of database components and and two engines in the client application. One to connect locally, and the other set to connect to the remote server, which when called I could do a simple append using SMI components that worked very well for me from one to the other.

How did that work? AFAIK even with DBISAM its not possible to have two engine components in the same app.

>The problem that I foresee here and that I seem to be running into with Elevated DB is that I am risking the corruption of my form data table structure and catalog file if I use more that one database and engine component in the same application.

That's easily solved - TEDBEngine is a singleton. Two sessions as Terry recommends will work, and there's no risk of messing up the catalog. However, you would have to use table components to do the transfer, or build the sql using the local session to run in the context of the remote session since the sql can't cross a session.

>Although I can easily change the session to remote, as I see it, I will lose my local access to my local table to append data to the remote server. I may be missing something here that I am sure is simple.

As Terry said two session will solve that.

>What is the best way to handle this so I can append data from the local client app to the remote server while keeping tables on the local machine and application active?

I like Jan's idea of using the built in replication/publishing capabilities. If you want to go down that route search for David Cornelius' posts - he's the guru in the area.

Roy Lambert [Team Elevate]
Mon, Jan 23 2012 4:53 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


I'm not the best person to help here. I tend to use F/S rather than C/S (keep telling myself I must switch but never do). If no one comes up with anything in the next couple of days I'll set up a testbed here and see what I can find out.

Roy Lambert [Team Elevate]
Mon, Jan 23 2012 10:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

John,

<< Now I have another problem. For some reason if I try to create a remote
database using Elevate DB Manager the remote database will not save, just
local databases.. Thus I get a 401 error in my application when I try to
connect to a remote session. Once Elevate DB Manager is closed the remote
database is longer there or saved when re-opened with Elevate DB Manager.
Any idea why the remote database is not saved? >>

You're mixing up a lot of different terms here.  For starters, whether a
database exists or not shouldn't affect whether you can connect a remote
session.  If you are creating databases using one application, and then
trying to open them in another application, and you get #401 "not found"
error, then have a situation where one application is using a different
configuration file than the other.

Are you always using remote sessions pointing to the same ElevateDB Server,
or are you sometimes using local sessions, and sometimes using remote
sessions ?  If the latter, then you need to make sure that your local
session is pointing to the same configuration file path as  the ElevateDB
Server.  Anything else, and you'll end up creating databases/users in two
different places.

--
Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jan 24 2012 1:21 AMPermanent Link

John Postnikoff

I think I need some more Elevate DB 101. I will review the docs to try to get the terminology right. I think I am stuck on DBISAM methods.

However, without using any of my applications and using only Elevate DB Server and only Elevate DB Manager here is the problem in detail. Perhaps this may clarify and steer me in the right direction to get connected with within my application as a remote connection.

1. If I create a LOCAL database inside of the Elevate DB Manager eg. Database1 in local disk C  with the path C:\Database1 all is OK. I can access tables, add users, and login with any user to a local database (without the need of the Elevate DB Server running under a local session).

2. If I try to create a REMOTE database eg. Database2 in local disk c with the path C:\Database2 the database will not save under Elevate DB Manager once closed even though I can open the tables while inside with the DB server running, plus I can only log in with Administrator and EDBDefault and even though different users are added with full permissions. I guess the users do not take effect if there is no Remote database found in the first place. I am trying to access as a remote session under localhost with the localhost IP address (with Elevate DB Server Running), just as I would with DBISAM.  So what am I missing and why is the Elevate DB Manager not saving the remote database that I define?

So to sum up. With Elevate DB Manager if I have a create local database all is fine. When I try to create the remote database using a different table set within the Elevate DB Manager the remote Database will not save and is non existent after exiting Elevate DB Manager, which local and remote are as defined inside Elevate DB Manager.  Hope this makes sense.

John


"Tim Young [Elevate Software]" wrote:

John,

<< Now I have another problem. For some reason if I try to create a remote
database using Elevate DB Manager the remote database will not save, just
local databases.. Thus I get a 401 error in my application when I try to
connect to a remote session. Once Elevate DB Manager is closed the remote
database is longer there or saved when re-opened with Elevate DB Manager.
Any idea why the remote database is not saved? >>

You're mixing up a lot of different terms here.  For starters, whether a
database exists or not shouldn't affect whether you can connect a remote
session.  If you are creating databases using one application, and then
trying to open them in another application, and you get #401 "not found"
error, then have a situation where one application is using a different
configuration file than the other.

Are you always using remote sessions pointing to the same ElevateDB Server,
or are you sometimes using local sessions, and sometimes using remote
sessions ?  If the latter, then you need to make sure that your local
session is pointing to the same configuration file path as  the ElevateDB
Server.  Anything else, and you'll end up creating databases/users in two
different places.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jan 25 2012 10:31 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

John,

<< 2. If I try to create a REMOTE database eg. Database2 in local disk c
with the path C:\Database2 the database will not save under Elevate DB
Manager once closed even though I can open the tables while inside with the
DB server running, plus I can only log in with Administrator and EDBDefault
and even though different users are added with full permissions. I guess the
users do not take effect if there is no Remote database found in the first
place. I am trying to access as a remote session under localhost with the
localhost IP address (with Elevate DB Server Running), just as I would with
DBISAM.  So what am I missing and why is the Elevate DB Manager not saving
the remote database that I define? >>

EDB Manager isn't actually "saving" anything when it comes to a remote
session - the EDB Server handles everything for a remote session.  More than
likely, the problem is that you've checked off the In Memory option for the
configuration path in the EDB Server configuration:

1) Click on the Stop Server link in the EDB Server's task links.
2) Click on the Edit Server Options link.
3) Select the Configuration tab
4) Make sure that the Configuration File Location is set to On Disk and not
In Memory.

If that isn't it, then the problem is that you're using two different
configuration file paths for the local session and the EDB Server, or you've
got the configuration file for the EDB Server stored someplace where
directory virtualization is in effect in Windows (\Program Files, etc.) and
is affecting the file storage.

--
Tim Young
Elevate Software
www.elevatesoft.com
Thu, Jan 26 2012 11:36 AMPermanent Link

John Postnikoff

"Tim Young [Elevate Software]" wrote:

John,

<< 2. If I try to create a REMOTE database eg. Database2 in local disk c
with the path C:\Database2 the database will not save under Elevate DB
Manager once closed even though I can open the tables while inside with the
DB server running, plus I can only log in with Administrator and EDBDefault
and even though different users are added with full permissions. I guess the
users do not take effect if there is no Remote database found in the first
place. I am trying to access as a remote session under localhost with the
localhost IP address (with Elevate DB Server Running), just as I would with
DBISAM.  So what am I missing and why is the Elevate DB Manager not saving
the remote database that I define? >>

EDB Manager isn't actually "saving" anything when it comes to a remote
session - the EDB Server handles everything for a remote session.  More than
likely, the problem is that you've checked off the In Memory option for the
configuration path in the EDB Server configuration:

1) Click on the Stop Server link in the EDB Server's task links.
2) Click on the Edit Server Options link.
3) Select the Configuration tab
4) Make sure that the Configuration File Location is set to On Disk and not
In Memory.

If that isn't it, then the problem is that you're using two different
configuration file paths for the local session and the EDB Server, or you've
got the configuration file for the EDB Server stored someplace where
directory virtualization is in effect in Windows (\Program Files, etc.) and
is affecting the file storage.

--
Tim Young
Elevate Software
www.elevatesoft.com


The setting was set on memory, which appears to have fixed my problems.  Thanks
Image