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 » Please help me understand u++ schemas  () 1 Vote
Re: Please help me understand u++ schemas [message #1598 is a reply to message #1594] Thu, 09 March 2006 15:20 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
SQL is "default SQL cursor" - one main cursor, useful for apps dealing with just one database. That line in fact defines that this default cursor will refer to created SqlLite session.

Now those scripts. U++ is able to generate a couple of database scripts from the .sch files:

* script that creates schems tables by adding individual columns

"adding individual columns" is quite imporant, as that way you are able to "upgrade" existing database schema in most cases - you just run the script, statements for existing columns will fail, but those that are not there yet will succed and upgrade schema

* script to add "attributes" to columns - attributes here are constraints or indexes

* script to drop "attributes" - note that this is often useful and harmless to stored data to recreate attributes (drop + add).

* script to wipe the schema out - seldom used and not present in the example

* script to perform initial setting of table content - for configuration tables etc...

All_Tables here creates those scripts - they are stored in Strings inside "sch".

Now performing script can be quite long operation, something you do not want to do each time you start your code. That is the reason for "ScriptChanged" - it tests whether script differs from the one stored inside "exe-directory".

"SaveNormal" then stores scripts into exe-dir.

Note that those script issues are usually present only in debug code. When delivering application, you can either execute scripts from exe-dir, or you can run debug version against customers database engine (recently, I prefer later).

Anything left to explain?

Mirek
 
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Read Message
Previous Topic: Multithread build problem with MySql
Next Topic: MySQL Link Issue [SOLVED]
Goto Forum:
  


Current Time: Mon Aug 25 21:07:31 CEST 2025

Total time taken to generate the page: 0.06047 seconds