CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Same form, same table --> different database

Print topic Send  topic

Author Message
jmancera

Posts: 13
Posted: 09/06/2007, 7:28 AM

Hi...

The main idea is to be able to switch databases, some like before show use db1 or db2... (of course same table structure, different data)

A simple casenario...

databases:

db1:
table: employees
structure: emp_code, emp_name

db2:
table: employees
structure: emp_code, emp_name

A grid showing employees from either db1 or db2 depending on any user conditiion....

have somebody deal with that...?

Regards

View profile  Send private message
klwillis


Posts: 428
Posted: 09/06/2007, 3:17 PM

Define 2 database connections for your project.

Use a flag ('i'e db1 or db2) to determine which database to use.

Dynamically create (via new clsDB<database-name>()) the database
connection you'll require for the grid.

You can then set the DataSource property for the grid prior to the query selection.

Quote jmancera:
Hi...

The main idea is to be able to switch databases, some like before show use db1 or db2... (of course same table structure, different data)

A simple casenario...

databases:

db1:
table: employees
structure: emp_code, emp_name

db2:
table: employees
structure: emp_code, emp_name

A grid showing employees from either db1 or db2 depending on any user conditiion....

have somebody deal with that...?

Regards



_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message

Add new topic Subscribe to topic   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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