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 » Community » Newbie corner » Database with several windows
Database with several windows [message #32239] Mon, 02 May 2011 18:14 Go to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

I cannot find how to have several windows to manage a database...

I have a database with several complex tables. I should like to have separates windows to manage each table. Each window will have a SqlArray showing the table, and will call dialog boxes to add, edit or delete records.

Something as it is done in SqlApp sample, supposing that you have several windows and tables like this (let's say for books, DVD, games etc.) together in the same application.

I tried to do this a simple way, but I get link errors saying "Undefined reference to XXX", XXX being the name of a table or a column in a table...

I suppose that I have something missing to link the windows classes to the .sch file, this one being declared for the main window, not for the secondary windows ?
Re: Database with several windows [message #32959 is a reply to message #32239] Sun, 26 June 2011 08:49 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi,

Try to use SqlId identifiers as global variables in your applications. It makes things easier to manage fields from different tables in the same application. For example, I use :

TABLE (NATIONS)
INT(IDNATION)PRIMARY_KEY AUTO_INCREMENT
STRING_(NATION,200)
STRING_(STATUS,50)
BLOB(FLAG)
END_TABLE

TABLE (UNITS)
INT(ID)PRIMARY_KEY AUTO_INCREMENT
INT (IDUNIT)
STRING_(UNITNAME,200)
BLOB(UNITPICTURE)
END_TABLE

TABLE (MAPS)
INT(IDMAP)PRIMARY_KEY AUTO_INCREMENT
INT(MAPNUMBER)
INT(MODULEOWNER)
STRING_(DESCRIPTION,200)
BLOB(MAPPICTURE)
END_TABLE

TABLE (MODULES)
INT(IDMODULE)PRIMARY_KEY AUTO_INCREMENT
STRING_(MODULENAME,200)
STRING_(EDITOR,200)
END_TABLE


and the SqlId:

SqlId TBLMAPS("MAPS"),TBLNATIONS("NATIONS"),TBLUNITS("UNITS"),TBLMODULES( "MODULES"),IDNATION("IDNATION"),
ID("ID"),IDMOD("IDMODULE"),IDUNIT("IDUNIT"),UNIT("UNITNAME "),IDM("IDMAP"),NUMBER("MAPNUMBER"),
MAPIMG("MAPPICTURE"),UNITIMAGE("UNITPICTURE"),OWNER("MODULEOWNER "),DESC("DESCRIPTION"),FLAG("FLAG"),
STATUT("STATUS"),NAME("NATION"),MODULE("MODULENAME"),EDITORMOD( "EDITOR"),ALL("*");

Sqlite3Session ASLDBSession;


Hoping this could be helpful

Regards

Biobytes
Re: Database with several windows [message #32977 is a reply to message #32239] Mon, 27 June 2011 16:00 Go to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi BioBytes,

Thanks for your help !

Finally, I worked around the problem, and I'm now busy on another project. But I will try again ASAP : probably, SqlId is what was missing to have it working...
Previous Topic: How to set GridCtrl header font size?
Next Topic: Converting HTML to "normal" text
Goto Forum:
  


Current Time: Mon Apr 29 07:37:12 CEST 2024

Total time taken to generate the page: 0.04302 seconds