Home » Community » Newbie corner » [SOLVED] Converting from 'Upp::Value' to 'char'
[SOLVED] Converting from 'Upp::Value' to 'char' [message #47551] |
Fri, 27 January 2017 08:59  |
Giorgio
Messages: 218 Registered: August 2015
|
Experienced Member |
|
|
Hi there,
I have to call a method passing some parameters I got from a DB:_macroLav.SetMLav(SQL[STATUS], SQL[SUBSTATUS], SQL[START_TIME]);
The STATUS in the db is a VARCHAR(1) field; in the schema file .sch is defined as follows:
When I try to compile I got the following error:
error C2664: 'void MLav::SetMLav(char,char,Upp::Time)': cannot convert parameter number 1 from 'Upp::Value' to 'char'
I came up with this awful solution:String s1 = SQL[STATUS];
char c1 = s1[0];
_macroLav.SetMLav(c1, SQL[SUBSTATUS], SQL[START_TIME]);
Is there a smarter way to convert from Upp::Value to char?
Thanks,
Gio
[Updated on: Thu, 02 February 2017 15:49] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 03 18:32:17 CEST 2025
Total time taken to generate the page: 0.00616 seconds
|