Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Connecting to multiple databases.
Connecting to multiple databases. [message #17311] Wed, 06 August 2008 20:10 Go to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
What is the best way to go about connecting to multiple databases and having multiple schema files? I have been testing some things out connecting to multiple databases simultaneously and it seems to be working well, but is there anything to watch out for in this situation? As of now, I am using 2 schema files (.sch) and 2 header files referencing those schema files.
Are there any functions that are limited to use referencing only 1 of the header files?
Are there any conflicts if I reference both header files from the same source file?
Re: Connecting to multiple databases. [message #17312 is a reply to message #17311] Wed, 06 August 2008 20:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
captainc wrote on Wed, 06 August 2008 14:10

What is the best way to go about connecting to multiple databases and having multiple schema files? I have been testing some things out connecting to multiple databases simultaneously and it seems to be working well, but is there anything to watch out for in this situation? As of now, I am using 2 schema files (.sch) and 2 header files referencing those schema files.
Are there any functions that are limited to use referencing only 1 of the header files?
Are there any conflicts if I reference both header files from the same source file?


The only think to watch for is that there is only single SQL....

Tom has added NOAPPSQL flag that you can to main config - then there will be no SQL Smile

In fact, even 1 schema files (but included for two dialects) could be OK (depends on how much DB specific stuff you put in).

Mirek
Re: Connecting to multiple databases. [message #17313 is a reply to message #17312] Wed, 06 August 2008 21:13 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
After doing some tests, I found that I need to contain the database creation/updating code to source files that only include 1 header that references 1 .sch. When I included both in main source file, the act of creating tables in the second database actually created the tables from both databases. This is probably due to overriding the macro for including the sch files.
Re: Connecting to multiple databases. [message #17314 is a reply to message #17313] Wed, 06 August 2008 21:15 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Yes, I am afraid this is correct.

Also, of course, if you are defining SqlIds using '_', you obviously cannot do it twice...

OTOH, it is of course good to know which #include does what...

Mirek
Previous Topic: SQLite: Date and Time
Next Topic: PostgreSQL Attribute Foreign Key --> Bug?
Goto Forum:
  


Current Time: Thu Apr 18 21:04:12 CEST 2024

Total time taken to generate the page: 0.02043 seconds