Overview
Features
Download
Documentation
Community
Add-Ons & Services

SQLite Provider - Buffering

A general discussion forum.

SQLite Provider - Buffering

Postby davidpmp » 21 Feb 2009, 15:48

Hi all,
how can i use SQLite ? when I register the connector and try to retrieve BLOB field, my session take some seconds to extract BLOB(i.e (4 Seconds)) but I have sqlite.phxsoftware.com for .net and when i use it for same database, the extraction time is 0.0 :D .

my lines of code is below:

Poco::Data::SQLite::Connector::registerConnector();
m_Session = new Session(SessionFactory::instance().create(SQLite::Connector::KEY, "C:\\Images.db"));
Poco::Data::BLOB blob;
*m_Session << "SELECT ColImage FROM Images WHERE ColIndex == :ln", use(nItem), into(blob), now;
BLOBInputStream stream(blob);
m_Reader = new BinaryReader(stream, BinaryReader::UNSPECIFIED_BYTE_ORDER);


after asign the BLOB to stream and asign the stream to BinaryReader I try to read some kind of types like (uint)(bool)(float)(string) and when my reading finished, the interval time between start and end is 4 Second.

I serialized my stream by .NET's BinaryReader into MemoryStream and store bytes of MemoryStream into BLOB field of database. and in c++ read this BLOB field and try to deserialize.
MemoryStream bytes contains multiple images, strings, booleans, floats, unsigned integers and so on.
the Time of extraction is more but my extraction ends successfully.

please help me,
Thanks,
Best Regards.
davidpmp
 
Posts: 8
Joined: 21 Feb 2009, 15:34

Re: SQLite Provider - Buffering

Postby alex » 17 Mar 2009, 16:52

davidpmp wrote:the Time of extraction is more but my extraction ends successfully.


This is possibly due to BLOB using SharedPtr with thread-safe ReferenceCounter.

What POCO version are you using?
alex
 
Posts: 1113
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest