Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

More Fun With PostgreSQL and VDO

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support
View previous topic :: View next topic  
Author Message
MikeR



Joined: 25 Jun 2016
Posts: 29

PostPosted: Wed Jan 17, 2018 9:39 pm    Post subject: More Fun With PostgreSQL and VDO Reply with quote

The ODBC driver that is pulled with the PostgreSQL installer defaults to an option, "Bools as Char". If this option is selected, it breaks the use of the GetBoolValue() method of VDO. Instead, you'll need to do this [C#]:

get
{
string s = GetStringValue("your_property_name", true);
bool b = false;
if (s != null && s.Length > 0) b = s == "1" || s.ToUpper()[0] == 'T';
return b;
}

Apparently, there are no issues whatsoever when going in the opposite direction, SetValue always works without an exception regardless.

Ideally, you can detect this situation programmatically, and then do whatever the driver is set to produce.

Cheers
_________________
Thanks,

-- Mike R.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group