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 » SqlArray and default value of some field
Re: SqlArray and default value of some field [message #33382 is a reply to message #33350] Sat, 30 July 2011 19:04 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13986
Registered: November 2005
Ultimate Member
forlano wrote on Wed, 27 July 2011 02:44

Hello,

This post is connected with this one
http://www.ultimatepp.org/forum/index.php?t=msg&th=6105& amp; amp; amp; amp;start=0&
and to the test case "SqlArray2.zip" provided by Sergey. I start a new topic as it is not specific of DropList and I am having problem even with OptionButton.

I have a SqlArray in which there are columns with DropList previuosly populated with some data. What I want is to let appear some default value in DropList. This default value should go in the database in case the user NOT modify its content.
In the Sergey test case the DropList is correctly populated:
		SQL * Select(SqlAll()).From(COUNTRY_T);
		while(SQL.Fetch()) {
			country.Add(SQL[0],SQL[1]);
		}

and then initialized to some default value
		
		country <<= "Russia";


When I insert a record the DropList seems lazy and does NOT show its supposed default and remains empty. If the user accept the row without to select an item the field remain empty.
I tried even

Any hint about setting a default value in SqlArray with embedded Ctrl?



ArrayCtrl::IdInfo::InsertValue / ArrayCtrl::Column::InsertValue.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SQLITE] New version (3.7.0) introduces write-ahead logging.
Next Topic: sqlite and GridCtrl
Goto Forum:
  


Current Time: Sun Jun 16 19:47:59 CEST 2024

Total time taken to generate the page: 0.01323 seconds