Overview
Features
Download
Documentation
Community
Add-Ons & Services

Setting session properties

Please post support and help requests here.

Setting session properties

Postby crioto » 17 Jun 2009, 12:33

I have an error, that my field size is bigger then Poco::Session can handle, so i need to change this value. I'm using SessionPool in my code, so look at my code, please:
Code: Select all
Session sess(this->getPool().get());
sess.setProperty("maxFieldSize", 1024);

After running this code, i'm getting exception:
Bad cast exception.
Failed to convert between const Any types

So, there is my question: how to change Properties, if they're consts?
crioto
 
Posts: 16
Joined: 09 Jun 2009, 09:06
Location: Kyrgyzstan, Bishkek

Re: Setting session properties

Postby alex » 17 Jun 2009, 13:24

crioto wrote:So, there is my question: how to change Properties, if they're consts?


Properties are not const - if you look at the error, you'll see that it says nothing about not being able to change the property. The problem is data conversion in Poco::Any.

Your code, however, works fine for me with the most recent trunk code (rev 1202). What code version and which compiler are you using?
alex
 
Posts: 1047
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Setting session properties

Postby crioto » 17 Jun 2009, 13:38

i have downloaded 1.3.5 package, cause i'm not an SVN-user. And i'm working in MVS2008

it says nothing about not being able to change the property

Sorry, "language-level" problems :D
crioto
 
Posts: 16
Joined: 09 Jun 2009, 09:06
Location: Kyrgyzstan, Bishkek

Re: Setting session properties

Postby alex » 17 Jun 2009, 14:13

crioto wrote:i have downloaded 1.3.5 package, cause i'm not an SVN-user. And i'm working in MVS2008

It works for me in 1.3.5 as well. Please walk through your code with debugger and find out where exactly the exception is triggered.
alex
 
Posts: 1047
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron