Home » U++ Library support » U++ SQL » SqlArray with an Option
SqlArray with an Option [message #54205] |
Sun, 07 June 2020 23:15  |
 |
forlano
Messages: 1207 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
I was doing experiment with SqlArray. Everything works with
arr.SetTable(TUSERS);
arr.AddKey(ID);
arr.AddColumn(N, "N", 1);
arr.AddColumn(NAME, "Name", 4);
arr.AddColumn(CAPTAIN, "Captain",4);
arr.AddColumn(EMAIL, "Email",4).Edit(edtEmail);
arr.AddColumn(PASSWORD, "Password",4).Edit(edtPass);
arr.SetOrderBy(N);
arr.Query();
and I am able to edit and save automagically the fields EMAIL and PASSWORD. Then I wanted to add a column of Option so that the user can select the rows he needs to elaborate later at once on the DB. So I added a column with
arr.SetTable(TUSERS);
arr.AddKey(ID);
arr.AddColumn("YN", "", 1).Ctrls<Option>(); //<============
...
and the compiler complained "YN" is not declared. So I added a dummy column in the database schema called YN and used
arr.AddColumn(YN, "", 1).Ctrls<Option>();
Now the Option appeared in each row on the left of the SqlArray, but the fields EMAIL and PASSWORD are no longer editable.
What am i missing? Is is possibile to have a column of Option in a SqlArray (I do not care to save in the database the value of the option).
Thanks,
Luigi
|
|
|
Goto Forum:
Current Time: Sat May 10 14:23:41 CEST 2025
Total time taken to generate the page: 0.01020 seconds
|