U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » sqlarray and sqlite (Trying to use sqlite example but...)
Re: sqlarray and sqlite [message #55005 is a reply to message #54819] Sun, 04 October 2020 17:27 Go to previous messageGo to previous message
jimlef is currently offline  jimlef
Messages: 90
Registered: September 2020
Location: US
Member
Again, Thank you Mirek!
Quote:

Sometimes it is worth providing IDs even if you are not directly dealing with SQL, leads to cleaner code

arrayLineItems.AddColumn(DESCRIPTION, "Description", 80);
....
(DESCRIPTION, arrayLineItems.GetColumn(i,DESCRIPTION))

Only one issue when I implement these, I keep getting:

102	if (optCustTaxable.Get() == true && arrayLineItems.GetColumn(i, ISTAXABLE)  == 1) {
103	     taxable = round((double)arrayLineItems.GetColumn(i, PRICE) * (double)arrayLineItems.GetColumn(i, QTY), 2);

/home/james/upp/MyApps/Invoices/UI/CreateInvoice.cpp (102): error: no viable conversion from 'Upp::SqlId' to 'int'
/home/james/upp/MyApps/Invoices/UI/CreateInvoice.cpp (103): error: no viable conversion from 'Upp::SqlId' to 'int'
...
/home/james/upp/MyApps/Invoices/UI/CreateInvoice.cpp (171): error: no viable conversion from 'Upp::SqlId' to 'int'


Every GetColumn call in the code generates this error?

Jim
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Friends? Cousins? Half-siblings?
Next Topic: how to make an editfield accept only number or date? have any examples in the documentation?
Goto Forum:
  


Current Time: Thu Sep 10 14:03:31 GMT+2 2026

Total time taken to generate the page: 0.00882 seconds