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 » U++ Library support » U++ SQL » Possible SqlOption Problem [Solved]
Re: Possible SqlOption Problem [message #22799 is a reply to message #22792] Mon, 17 August 2009 15:39 Go to previous messageGo to previous message
marroyo is currently offline  marroyo
Messages: 8
Registered: August 2009
Location: Argentina
Promising Member
Hi Mirek. I will be more explicit now.
I have a PostgreSQL table SOCIO with a activo (active) boolean field.

I've defined a window with a SqlArray object.

SqlArray show's me the boolean column as value 1.

I want edit fields, so I add a column to SqlArray by doing

socios_array.AddColumn(ACTIVO, "Activo").Edit(activo);

If I declare activo of SqlOption type, when I try to do socios_array.Query(), I get the following assertion failure:

Assertion failed in C:\uppsrc\Core/Value.h, line 417
dynamic_cast<const RichValueRep *>(p)


If I declare activo as Option type, I can't edit (or insert) rows because the SQL statement generated is

insert into SOCIO(OBJID, RAZON_SOCIAL, ACTIVO, CATEG_IVA) values (801, 'MARCELO', 1, 'C')

You can see that ACTIVO column value is an integer (not a boolean), getting a database error from PostgreSQL.

I could fix it doing a Convert from Option, but I think it is the goal of SqlOption.

Thank you.
 
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: MSSQL binary data
Next Topic: [sql] Select embeded in join
Goto Forum:
  


Current Time: Mon Apr 28 14:23:57 CEST 2025

Total time taken to generate the page: 0.00642 seconds