Home » U++ Library support » U++ SQL » Possible SqlOption Problem [Solved]
Re: Possible SqlOption Problem [message #22839 is a reply to message #22814] |
Fri, 21 August 2009 14:27   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
marroyo wrote on Tue, 18 August 2009 14:25 | PostgreSQL doesn't accept 0, 1 as boolean values.
Extract from PostgreSQL manual:
Valid literal values for the "true" state are:
TRUE
't'
'true'
'y'
'yes'
'1'
For the "false" state, the following values can be used:
FALSE
'f'
'false'
'n'
'no'
'0'
For now, I've to define a Convert for Option.
Thank you, Mirek.
|
Hm, now looking at THIS, maybe the correct solution would be to convert Postgre bool (in to "0" or "1" (now it is getting converted to numeric value). In that case, SqlOption would still be working and Insert would accept "0" "1" values just fine. What do you think?
Something like:
void PostgreSQLConnection::GetColumn(int i, Ref f) const
{
.....
case BOOL_V:
f.SetValue(*s == 't' ? true : false);
break;
to
void PostgreSQLConnection::GetColumn(int i, Ref f) const
{
.....
case BOOL_V:
f.SetValue(*s == 't' ? "1" : "0");
break;
[Updated on: Fri, 21 August 2009 14:27] Report message to a moderator
|
|
|
 |
|
Possible SqlOption Problem [Solved]
By: rbmatt on Fri, 04 August 2006 23:58
|
 |
|
Re: Possible SqlOption Problem
By: mirek on Sat, 05 August 2006 06:54
|
 |
|
Re: Possible SqlOption Problem
By: rbmatt on Sat, 05 August 2006 07:24
|
 |
|
Re: Possible SqlOption Problem
By: marroyo on Fri, 14 August 2009 21:39
|
 |
|
Re: Possible SqlOption Problem
By: mirek on Sun, 16 August 2009 23:58
|
 |
|
Re: Possible SqlOption Problem
By: marroyo on Mon, 17 August 2009 15:39
|
 |
|
Re: Possible SqlOption Problem
By: mirek on Mon, 17 August 2009 20:18
|
 |
|
Re: Possible SqlOption Problem
By: marroyo on Tue, 18 August 2009 20:25
|
 |
|
Re: Possible SqlOption Problem
By: mirek on Fri, 21 August 2009 14:27
|
 |
|
Re: Possible SqlOption Problem
By: marroyo on Fri, 21 August 2009 19:12
|
 |
|
Re: Possible SqlOption Problem
By: marroyo on Wed, 26 August 2009 23:37
|
 |
|
Re: Possible SqlOption Problem
By: mirek on Fri, 28 August 2009 09:54
|
Goto Forum:
Current Time: Mon Apr 28 14:13:22 CEST 2025
Total time taken to generate the page: 0.01106 seconds
|