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 » 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 Go to previous message
Giorgio is currently offline  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:
STRING_ (STATUS, 1)


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

 
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] Logging and LOG_APPEND
Next Topic: [SOLVED] Showing elapsed time
Goto Forum:
  


Current Time: Sat Apr 27 23:16:56 CEST 2024

Total time taken to generate the page: 0.03109 seconds