Search found 6 matches

Go to advanced search

by Soho
21 Apr 2013, 16:01
Forum: General Discussion
Topic: Path - how to quote if it with spaces?
Replies: 1
Views: 1256

Path - how to quote if it with spaces?

Hi all,

If a path contains some spaces it can be quoted with Windows API function PathQuoteSpaces().
How can I do the same using Poco?

Thanks in advance
by Soho
18 Nov 2012, 18:55
Forum: General Discussion
Topic: Mapping of complex data type with different statements?
Replies: 4
Views: 2055

Re: Mapping of complex data type with different statements?

With thanks to alex, current solution works, although it looks a little bit bulky. So, comments welcome! namespace Poco { namespace Data { typedef void ( *BindMethod )( std::size_t, const data_collection::value_type&, AbstractBinder* ); typedef std::size_t ( *SizeMethod )(); struct bind_context ...
by Soho
08 Nov 2012, 12:52
Forum: General Discussion
Topic: Register app as Windows Service with given commandline?
Replies: 2
Views: 1574

Re: Register app as Windows Service with given commandline?

Well, the way with registry is known. Just I thought there is some special "poco way" to do that... :?
Anyhow, thanks for reply!
by Soho
07 Nov 2012, 11:55
Forum: General Discussion
Topic: Register app as Windows Service with given commandline?
Replies: 2
Views: 1574

Register app as Windows Service with given commandline?

Hello, Suppose I want to register my app as Windows Service. For that I have to inherit the class of my app from the Poco::Util::ServerApplication. Right? That's ok. But how can I register service to start with the given commandline? For instance, I need to start my app as service with commandline: ...
by Soho
24 Oct 2012, 15:05
Forum: General Discussion
Topic: Mapping of complex data type with different statements?
Replies: 4
Views: 2055

Re: Mapping of complex data type with different statements?

Thanks for reply, It's ugly and not thread safe, but you could have a static boolean in TypeHandler specialization to alternate between obj.a and obj.b. Inclining to similar solution but use pointer_to_functions/functors/delegates instead of boolean variable and switch them before each Statement(). ...
by Soho
22 Oct 2012, 10:29
Forum: General Discussion
Topic: Mapping of complex data type with different statements?
Replies: 4
Views: 2055

Mapping of complex data type with different statements?

For simplicity, suppose there is an collection of complex objects: struct data { int a; int b; }; std::vector< data > data_collection; //... Poco::Data::Session db( "SQLite", ":memory:" ); Statement( db ) << "INSERT INTO TABLE_A VALUES( ?1 )", use( data_collection ), no...

Go to advanced search

cron