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 » master/detail sqlite3 example
master/detail sqlite3 example [message #33044] Mon, 04 July 2011 15:30 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I saw the reference example SqlArray but I need something different that I already perform under PHP/MySql with the right tool. I wonder if I can easily reply it with Upp/Sqlite.

I have two tables, for example:

Author
----------------------
id | name | birthday

and

Book
-----------------------
id | title | author_id

I want to show the table Book in an ArrayCtrl (SqlArray ?) but the column author_id should list, via a DropList, all the names contained in table Author. So the user simply select the author name already in table. Of course when the data is saved the record of Book should contain the 'id' and not the name of the author.
Is it possible in some easy way? I am able to realize it using ArrayCtrl and DropList building all pieces of code, but maybe does exist a super short way.

Thank you,
Luigi
Re: master/detail sqlite3 example [message #33052 is a reply to message #33044] Tue, 05 July 2011 10:12 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Hello Luigi! I think that there is no super-short way to implement this idea.

The maximum that can be done - use a different short commands to load the Array of all the rows in one command


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: master/detail sqlite3 example [message #33056 is a reply to message #33052] Tue, 05 July 2011 15:48 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
sergeynikitin wrote on Tue, 05 July 2011 10:12

Hello Luigi! I think that there is no super-short way to implement this idea.



Privet Sergey!

I was hoping in some specialized droplist Ctrl that could be feeded with (key, value) of a given table.
I'll do it myself.

Poka,
Luigi
Re: master/detail sqlite3 example [message #33065 is a reply to message #33056] Tue, 05 July 2011 19:43 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

See
http://www.ultimatepp.org/forum/index.php?t=msg&goto=323 50&&srch=Load#msg_32350

I meant something like this.


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Previous Topic: Sqlite with U++
Next Topic: SqlArray and data validation
Goto Forum:
  


Current Time: Tue Apr 16 16:51:12 CEST 2024

Total time taken to generate the page: 0.01311 seconds