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 » More .sch files?
Re: More .sch files? [message #34833 is a reply to message #34825] Wed, 14 December 2011 07:19 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
Wolfgang wrote on Tue, 13 December 2011 15:31

thank you for answer but how to tell the SqlSession which .sch file it should use?

do you told me this - or?
Sqlite3Session sql_db1;
Sqlite3Session sql_db2;

if (!sql_db1.Open(path)) { /* break */ }
if (!sql_db2.Open(path)) { /* break */ }

SqlSchema sch(SQLITE3);

All_Tables(sch);
SqlPerformScript(sql_db1, sch.Upgrade());
SqlPerformScript(sql_db1, sch.Attributes());

SqlPerformScript(sql_db2, sch.Upgrade());
SqlPerformScript(sql_db2, sch.Attributes());


I understand how to tell SqlPerformScript which session it should perform but I dont see the connection between
#define MODEL <urlaub/urlaub.sch>

and
SqlSchema sch(SQLITE3);



I see...

Well, it is all a bit complicated, however:

All_Tables

is static. So if you need more databases with different models, you have to place those schema includes in different files, mark them "no blitz" and create schema upload in each file.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sql + editstring
Next Topic: BUG with "Run to cursor (in debug)"
Goto Forum:
  


Current Time: Sun Jun 08 17:16:24 CEST 2025

Total time taken to generate the page: 0.04308 seconds