CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Using two databases

Print topic Send  topic

Author Message
Don Orrell
Posted: 06/15/2001, 8:34 AM

After looking at the examples, it seems almost everyone of them have a table
(Employees, Members, Users) to obtain a persons name and other data. Is it
possible to use CodeCharge to access two databases? One database to obtain
information about a individual and their rights and the second database to
hold the information for the application.

I am thinking about having a portal with links to the other applications
such as Support, EmplDir, etc., but I don't want to place and maintain an
individual's name in five different tables.

I can't figure out how to access a second database in CodeCharge and display
and edit the information in the second database on the variouis applications
pages.

Thanks in advance for your help and/or examples.

Don Orrell
dorrell@favoritenurses.com


CodeCharge
Posted: 06/15/2001, 1:29 PM

You would need to implement a custom authentication functionality through
CodeCharge Events.
An easier solution though may be to create one database with all tables that
you need, and modify various applications to run out of that one database.
In such case the user table woule be shared between all projects.


"Don Orrell" <dorrell@favoritenurses.com> wrote in message
news:9gd9u7$o2e$1@mail.tankhill.com...
> After looking at the examples, it seems almost everyone of them have a
table
> (Employees, Members, Users) to obtain a persons name and other data. Is
it
> possible to use CodeCharge to access two databases? One database to
obtain
> information about a individual and their rights and the second database to
> hold the information for the application.
>
> I am thinking about having a portal with links to the other applications
> such as Support, EmplDir, etc., but I don't want to place and maintain an
> individual's name in five different tables.
>
> I can't figure out how to access a second database in CodeCharge and
display
> and edit the information in the second database on the variouis
applications
> pages.
>
> Thanks in advance for your help and/or examples.
>
> Don Orrell
>dorrell@favoritenurses.com
>
>
>

Dr. Scott R. Senay
Posted: 06/15/2001, 2:31 PM

Greetings Don,

I'm not quite sure if or how it relates, but I what I might suggest is
having a master authentication system and maintain session variable between
applications. Set things up to authenticate against one of the systems and
then use the session variables to track who and what... If you look at the
following two lines of code:

-------------------------------------------------------
set_session("UserID", $db->f("member_id"));
set_session("UserRights", $db->f("security_level_id"));
-------------------------------------------------------

We see here that two session variables are set, once set they will work AS
LONG AS the browser is open. These two lines come from the "Login.php"
form/page created by CodeCharge, and don't specify any particular database,
logically this should be language independent. So, this is my long winded
way of saying that if you define the architecture correctly, you only need
to maintain ONE table full of user permissions and authentication code.
Build your system as a portal (allowing users to login and connect) and then
the permissions take effect over everything else...

It's an architecural issue more than a technical issue since the folks at
YesSoftware have not put a limitation on the session data...

If you need further assistance, feel free to give me a yell...

Scott....

P.S. This "session trickery" actually works not only across databases, but
across domains as well... One could potentially consider it a "bug" or
security flaw... I have multiple domains and system on each of them, with
the same UserID / Access Rights in each and I can in a single browser
session move between domains without authenticating again...



Don Orrell <dorrell@favoritenurses.com> wrote in message
news:9gd9u7$o2e$1@mail.tankhill.com...
> After looking at the examples, it seems almost everyone of them have a
table
> (Employees, Members, Users) to obtain a persons name and other data. Is
it
> possible to use CodeCharge to access two databases? One database to
obtain
> information about a individual and their rights and the second database to
> hold the information for the application.
>
> I am thinking about having a portal with links to the other applications
> such as Support, EmplDir, etc., but I don't want to place and maintain an
> individual's name in five different tables.
>
> I can't figure out how to access a second database in CodeCharge and
display
> and edit the information in the second database on the variouis
applications
> pages.
>
> Thanks in advance for your help and/or examples.
>
> Don Orrell
>dorrell@favoritenurses.com
>
>
>

Anthony Trotter
Posted: 06/15/2001, 4:19 PM

Don,

As CC Support mentioned, creating one db is best and Scott mentioned
how to handle user group permissions with sessions. You can also
handle the permission in a cookie, but that is up to you.

To use two or more db's to share tables, your will need to link the
tables within your database. Let me explain the process in ACCESS.
Say you have a db, Users, that only stores your user's info and access
rights in one or more tables. You could link that table to your
Support, EmplDir, etc., and it will operate as if it is "a part" of
each of those tables. Another solution is to create separate db's,
Users, Support, EmplDir, etc. and link them all together in a "Master"
db that consists of only the linked tables from every other database.

You would use either of the methods above if you want to grant access
permissions to certain tables. This method would make it easier
because the db's are physically separated. You may also have many,
many tables and having them all exist in one db, simply makes db
management a nightmare.

My opinion is that you take Scott and Supports advice unless you have
good reason to do otherwise. If you are using ACCESS and have a good
db design, it will not impact your performance. You can always upsize
to SQL Server or change over to MYSQL for that matter, should the need
arise.

Anthony


"Don Orrell" <dorrell@favoritenurses.com> wrote in message
news:9gd9u7$o2e$1@mail.tankhill.com...
> After looking at the examples, it seems almost everyone of them have
a table
> (Employees, Members, Users) to obtain a persons name and other data.
Is it
> possible to use CodeCharge to access two databases? One database to
obtain
> information about a individual and their rights and the second
database to
> hold the information for the application.
>
> I am thinking about having a portal with links to the other
applications
> such as but I don't want to place and maintain an
> individual's name in five different tables.
>
> I can't figure out how to access a second database in CodeCharge and
display
> and edit the information in the second database on the variouis
applications
> pages.
>
> Thanks in advance for your help and/or examples.
>
> Don Orrell
>dorrell@favoritenurses.com
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.