Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 18 of 18 total
Thread EDB and Sessions
Fri, Mar 3 2017 7:02 PMPermanent Link

rbaroniunas

Baron Software

Avatar

Roy,

I have read the manual and it does not answer a lot.  I do not want anyone to take this personally but this is what i have seen using this product.

I want to be able to use it as a standalone so i can quickly get the application put together and deliver to market. I have followed the tutorial in the manual and came up with some issues.

I use MS SQL for the high end products and FireDac with my applications but i want the ability to create a single user or smaller that cannot afford MS SQL that is the reason i purchased EDB.  What i found lacking in the manuals is a single user versus a multiple user approach, the setup and what to expect.

Let's face it a session for a single user is one session and nothing else. I have seen on Windows 10 Professional that when I attempted to open the cdcollector example it fails due to access denied, not sure why but i will resolve it.

I was hoping i can figure this out by using the manual but there is so many open areas that it provides no answers.

On my single user i should have Engine / Session / Database / Tables and i should be able to create a separate session to handle that but there is nothing in the manual to discuss the EDB Manager and how to handle that.

Richard Baroniunas
Software Developer and DBA
Richard@Baronsoftware.com
Fri, Mar 3 2017 7:02 PMPermanent Link

rbaroniunas

Baron Software

Avatar

Roy,

I have read the manual and it does not answer a lot.  I do not want anyone to take this personally but this is what i have seen using this product.

I want to be able to use it as a standalone so i can quickly get the application put together and deliver to market. I have followed the tutorial in the manual and came up with some issues.

I use MS SQL for the high end products and FireDac with my applications but i want the ability to create a single user or smaller that cannot afford MS SQL that is the reason i purchased EDB.  What i found lacking in the manuals is a single user versus a multiple user approach, the setup and what to expect.

Let's face it a session for a single user is one session and nothing else. I have seen on Windows 10 Professional that when I attempted to open the cdcollector example it fails due to access denied, not sure why but i will resolve it.

I was hoping i can figure this out by using the manual but there is so many open areas that it provides no answers.

On my single user i should have Engine / Session / Database / Tables and i should be able to create a separate session to handle that but there is nothing in the manual to discuss the EDB Manager and how to handle that.

Richard Baroniunas
Software Developer and DBA
Richard@Baronsoftware.com
Sat, Mar 4 2017 3:25 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Richard


>I have read the manual and it does not answer a lot.

Neither manual covers EDBManager in any depth they are intended for the programmer where it goes into a lot of depth. The very first bit tells you how to create a database for the tutorial. Generally, whilst there are some hidden features, its simple to use.

>I do not want anyone to take this personally but this is what i have seen using this product.

No problem. We try not to take things personally on these newsgroups and do try to be helpful. However, we do need some assistance to be able to help you. Most of the questions you are asking are far to board.

>I use MS SQL for the high end products and FireDac with my applications but i want the ability to create a single user or smaller that cannot afford MS SQL that is the reason i purchased EDB. What i found lacking in the manuals is a single user versus a multiple user approach, the setup and what to expect.

As I said in a previous post ElevateDB is a multi user database - it doesn't have a dedicated single user mode, neither does DBISAM. However, I gave you a number of ways of limiting it to a single user and there are other approaches mentioned in these newsgroups. If you need a dedicated single user database have a look on Torry or possibly think about SQLite. You could also (depending on data size) think about an in-memory database (say kbmMemTable or ElevateDB's own).

I'm also interested in what's smaller than a single user.

>Let's face it a session for a single user is one session and nothing else.

I really wish Tim hadn't called it a session, that name has caused a bit of confusion now and again. A single user application can have many EDBSessions in the main thread and also a load in subsidiary threads. Think of an EDBSession as a connector between one or more databases and the engine.

> have seen on Windows 10 Professional that when I attempted to open the cdcollector example it fails due to access denied, not sure why but i will resolve it.

That one is usually caused by lack of OS privileges, you can also check the ConfigPath in the CDCollectorEngine component to see where its pointing.

>I was hoping i can figure this out by using the manual but there is so many open areas that it provides no answers.

As I said above the manual is intended as a reference for programmers, as such it does a good job. Tim is a one man band and as such, and at the prices he charges, can't produce a manual covering all possible use cases for ElevateDB and EDBManager.

>On my single user i should have Engine / Session / Database / Tables and i should be able to create a separate session to handle that but there is nothing in the manual to discuss the EDB Manager and how to handle that.

Please take this as a constructive comment rather than an insult but I am wondering just what you're looking for. If you open EDBManager you are presented with a screen. Under the page/column headed "Elevate DB Manager Properties" you should see Tasks the top one of which is "Create New Session". That should give a clue. Click on it and a multi page dialog opens. Fill in the bits (if you don't understand any specific box ask here) click OK and you've got your session. If yu want to use the default user name/password they are Administrator/EDBDefault

EDBManager is simply a Delphi application for which you have the source code - it is multi-user - it doesn't have a single user mode.

When you create your application you need to drop an EDBEngine, EDBSession & EDBTable(s), EDBQuery(s) onto the form (or better still a a datamodule) and set the properties on them appropriately.


Roy Lambert
Sat, Mar 4 2017 2:50 PMPermanent Link

Raul

Team Elevate Team Elevate

On 3/3/2017 7:02 PM, rbaroniunas wrote:
> I want to be able to use it as a standalone so i can quickly get the application put together and deliver to market. I have followed the tutorial in the manual and came up with some issues.

EDB works very well for this. There *IS* a small learning curve as with
any product but again once you get past that initial stage it has tons
of power and capability.

> I use MS SQL for the high end products and FireDac with my applications but i want the ability to create a single user or smaller that cannot afford MS SQL that is the reason i purchased EDB.  What i found lacking in the manuals is a single user versus a multiple user approach, the setup and what to expect.

EDB can handle this just fine - note that EDB happens to also scale to
the multi-user locally and multi-user in client/server architecture.

However in your case you likely really just need to just look at "local"
sessions (not remote).

As to the single user - this really depends on your exact requirements
and how you define "single user".

EDB local sessions are great for things like application with data on
the same computer.

In fact every application can have its own database (so your product A
and product B can both run on same system and exach has its own EDB data
without interferring with other one) or if you want them to share a
database that can be done as well - however this is all really up to
your design.

In addition you can do things like ensure true single user access -
meaning that 2 instances of the same app cannot be run on same computer
against same data (again something that would be part of your app design
if you so desire).

> Let's face it a session for a single user is one session and nothing else. I have seen on Windows 10 Professional that when I attempted to open the cdcollector example it fails due to access denied, not sure why but i will resolve it.

No - EDB session is a connectivity construct and can be many things. App
can have 1 session or multiple sessions (if app is multi-threaded then
you might end up with multiple sessions) - however in all those cases it
can still be a single user app/database if you so want.

> On my single user i should have Engine / Session / Database / Tables and i should be able to create a separate session to handle that but there is nothing in the manual to discuss the EDB Manager and how to handle that.

looking back thru this thread i think you're still in the learning curve
phase so let me ask you couple of questions to better understand the
requirements so we can better help you along with advice:

1. Are you planning to ship any data with the application or do you want
the application to start with an "empty" database ?

2. if you ship data do you want data to be "read-only" or would user be
able to add/edit data as well ?

3. Is your preference to ship empty database files or simply have the
app create needed tables/etc from scratch when it's 1st started ?

4. Would the app always use the same database or will you have an option
for the user to pick with data to use (basically same exe but on startup
you can access TESTING vs PRODUCTION etc)

5. What exactly does "single user" mean to you ?  Do you mean app on
local PC with local data or do you mean "single instance of the app on
local pc" can access data (any further app instances muct be locked out).

That's all for now.

These newsgroups are peer supported but there are lot of helpful people
here if you want to ask more specific questions of the sort "how to do X".

Raul
Sun, Mar 5 2017 2:19 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Stupid auto correct

>No problem. We try not to take things personally on these newsgroups and do try to be helpful. However, we do need some assistance to be able to help you. Most of the questions you are asking are far to board.

should have been

No problem. We try not to take things personally on these newsgroups and do try to be helpful. However, we do need some assistance to be able to help you. Most of the questions you are asking are far to broad.

Roy
Sun, Mar 5 2017 2:37 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul


You say it so much nicer than I do Smiley

Roy Lambert
Mon, Mar 6 2017 10:16 AMPermanent Link

Raul

Team Elevate Team Elevate

On 3/4/2017 2:50 PM, Raul wrote:
> 2. if you ship data do you want data to be "read-only" or would user be
> able to add/edit data as well ?

As a simple example i've included some code below for basic local table
access.

Few assumptions to simplify this for me Smile

1. This assumes you ship your app and also include a EDB config and
database with sample data (you can create them with edbmanager and copy
to app location).

2. EDB files are under subfolder called EDBDATA relative to exe location.

2. Database is called "DB" and there is one table called "tblCars"

3. Delphi app has 1xTEDBSession , 1xTEDBDatabase  and 1xTEDBTable
component to show them being used. For engine it's using the default one.


procedure TForm1.FormCreate(Sender: TObject);
var edbConfigPath:string;
begin
  edbConfigPath := ExtractFilePath(System.ParamStr(0)) + 'EDBDATA\';
  //you could check for config file (or folder) here or just reply on
exception handler below
  //use "if FileExists( edbConfigPath + Engine.ConfigName +
Engine.ConfigExtension ) = false" then ...
  try
    //set temp path, unticode and config path that is EDBDATA under exe
folder
    Engine.TempTablesPath := Engine.GetTempTablesPath;
    Engine.CharacterSet := csUnicode;
    Engine.ConfigPath := edbConfigPath;
    Engine.Active := true;

    //set session params - local and supply auth info
    EDBSession1.AutoSessionName := true;
    EDBSession1.SessionType := stLocal;
    EDBSession1.LoginUser := 'Administrator';
    EDBSession1.LoginPassword := 'EDBDefault';
    EDBSession1.Open;
  except
    on EDBEx:EEDBError do
    begin
      //invalid config path or such
      ShowMessage( 'Invalid/missing EDB config. Error code ' +
inttostr(EDBEx.ErrorCode) + '. Message=' + EDBEx.Message  );
      exit; //we're done
    end;
  end;

  try
    //open database
    EDBDatabase1.DatabaseName := 'MyAppDB';
    EDBDatabase1.Database := 'DB';
    EDBDatabase1.SessionName := EDBSession1.SessionName;
    EDBDatabase1.Open;
  except
    on EDBEx:EEDBError do
    begin
      ShowMessage( 'Database not found. Error code ' +
inttostr(EDBEx.ErrorCode) + '. Message=' + EDBEx.Message  );
      exit; //we're done
    end;
  end;

  //finally open a sample table
  EDBTable1.DatabaseName := EDBDatabase1.DatabaseName;
  EDBTable1.TableName := 'tblCars';
  EDBTable1.Open;
  showmessage(' tblCars has ' + inttostr(EDBTable1.RecordCount) + '
records');
end;



In terms of EDB manuals i would suggest you start with architecture

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=10B&topic=Architecture


as it lays out in order and them use steps you need (for local access)

for example engine start

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=10B&topic=configuring_starting_engine


and session setup

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=10B&topic=Connecting_Sessions

and database

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=10B&topic=Opening_Databases

and finally tables


http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=10B&topic=Opening_Tables_Views


Hopeefully this helps

Raul
Mon, Mar 6 2017 3:13 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< I use MS SQL for the high end products and FireDac with my applications but i want the ability to create a single user or smaller that cannot afford MS SQL that is the reason i purchased EDB.  What i found lacking in the manuals is a single user versus a multiple user approach, the setup and what to expect. >>

From the standpoint of how you use EDB, there *isn't* any fundamental difference between single-user and multi-user, which is why the manuals don't spend any time on it.

<< Let's face it a session for a single user is one session and nothing else. >>

<< I have seen on Windows 10 Professional that when I attempted to open the cdcollector example it fails due to access denied, not sure why but i will resolve it. >>

That's because you were probably trying to open it as a project from within the \Program Files installation directory.  You'll need to copy it to a directory that you have read-write privileges in order to modify it/work with it.  I'll make sure that this is added to the installations - Elevate Web Builder does this, but not ElevateDB, and that's an oversight on our part.

<< On my single user i should have Engine / Session / Database / Tables and i should be able to create a separate session to handle that but there is nothing in the manual to discuss the EDB Manager and how to handle that. >>

Forget the EDB Manager in relation to *your* application, it's confusing the issue.  Within your applications, just follow the instructions given with the tutorial here:

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=10B&topic=Loc_Application_Tutorial


and you'll have everything that you need.

Tim Young
Elevate Software
www.elevatesoft.com
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image