Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Create external module on a remote server.
Wed, Aug 7 2013 7:16 AMPermanent Link

Abdulaziz Al-Jasser

Hi,

I've asking lately too much question about external modules...spare me Smile I am facing a small problem.  I am trying to create an external module on a remote server (C/S) which should be easy except for the "PATH" clause.  I don't know the path but one thing I know the external module is located on the same directory of the database.  How to deal with that?
Regards,
Abdulaziz Jasser
Wed, Aug 7 2013 8:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


First a question - why are you putting the dll in with the database - I'd suggest the same folder as the configuration file (and if you have that in with the database you shouldn't Smiley.

If you drop it in to the configuration folder leave the path blank eg

CREATE MODULE nlhFuncts
PATH 'nlhfunctions.dll'

If you do want it in with the tables then you'll have to write a bit of SQL/PSM code to first get the path to the database from the system eg

select Path from configuration.databases where name = 'junk'

and use that path.


Roy Lambert [Team Elevate]
Wed, Aug 7 2013 4:21 PMPermanent Link

Abdulaziz Al-Jasser

Roy,

<<If you do want it in with the tables then you'll have to write a bit of SQL/PSM code to first get the path to the database from the system eg

select Path from configuration.databases where name = 'junk'

and use that path.>>


I module is save with the DB (No chance to delete it).  This is what I need.. thanks.

Regards,
Abdulaziz Jasser
Wed, Aug 14 2013 11:59 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Abdulaziz,

<< I've asking lately too much question about external modules...spare me Smile
I am facing a small problem.  I am trying to create an external module on a
remote server (C/S) which should be easy except for the "PATH" clause.  I
don't know the path but one thing I know the external module is located on
the same directory of the database.  How to deal with that? >>

As Roy indicated, all relative paths for modules and databases are relative
to the configuration file path, so using the database location is going to
be a lot more difficult than just storing the module in (or relative to) the
configuration path.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 15 2013 8:01 AMPermanent Link

Abdulaziz Al-Jasser

Roy,
Tim,

<<First a question - why are you putting the dll in with the database - I'd suggest the same folder as the configuration file (and if you have that in with the database you shouldn't .>>

The database tables + configuration file + modules are located in the same path.  Does this sound the right approach?  If not what is the best practice?
Regards,
Abdulaziz Jasser
Thu, Aug 15 2013 8:26 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


>The database tables + configuration file + modules are located in the same path. Does this sound the right approach? If not what is the best practice?

I know this has been discussed before but I can't remember the arguments either way.

If you have a 1:1 relationship between your application and the database then, in my personal view, its a reasonably valid approach. For me I generally have a 1:M relationship between the application and database. Back in the DBISAM days that simply meant having multiple directories. With ElevateDB it means storing the database information in the configuration file coupled with multiple directories. In either case I generally have the application and control files in one directory and the databases in subdirectories off that.

I suppose doing it the "proper" Windows way you should have the application in Program Files with the configuration and control files in a directory in Application Data with the tables in a subdirectory off that. YUCK.

Roy Lambert [Team Elevate]
Thu, Aug 15 2013 8:42 AMPermanent Link

Abdulaziz Al-Jasser

Roy,

<<I suppose doing it the "proper" Windows way you should have the application in Program Files with the configuration and control files in a directory in Application Data with the tables in a subdirectory off that. YUCK.>>

Smile I think I will stick to 1:1 approach.  It easy to move/find/manage things.

Regards,
Abdulaziz Jasser
Mon, Aug 19 2013 2:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Abdulaziz,

<< The database tables + configuration file + modules are located in the
same path.  Does this sound the right approach?  If not what is the best
practice? >>

That will work, but the "official" recommended practice is:

Application Directory -> Configuration Files (config file, log file)

Application Directory\Database Directory -> Database Files (catalog, table
files)

This approach allows for adding more database directories later without
disrupting anything, you can use relative paths, and it works well with the
Windows AppData/ProgramData directory/folder design.

Tim Young
Elevate Software
www.elevatesoft.com


Image