From: Martijn T. <m.t...@up...> - 2009-02-19 07:45:07
|
Hello Alexander, >> I've tried a different componentset and it browses data just >> fine in Delphi. >> >> However, I ran into a new problem -- >> >> I have this table with BLOBs, I put down an odbc query >> component in Delphi and set "UniDirectional" to True. >> >> When I want to activate the query component, it calls >> SQLExecute and then doesn't return for quite a while. >> Meanwhile, the memory usage of the application goes >> -way up- ... and it ends with an Access Violation error. >> >> Is the driver fetching all rows despite the component >> not doing that? >> >> >> > Hello Martijn! > What components do you use? The ones from SoftVector. > I think you need the Cursor type = ForwardOnly (else the driver > fetching all rows) . It seems the components always used a static cursor. I've modified the components to use a ForwardOnly cursor: if FUniDirectional then CheckError(SQLSetStmtAttr(FStmtHandle, SQL_ATTR_CURSOR_TYPE, Pointer(SQL_CURSOR_FORWARD_ONLY), SQL_IS_UINTEGER)) // set static cursor to avoid problems with blobs else CheckError(SQLSetStmtAttr(FStmtHandle, SQL_ATTR_CURSOR_TYPE, Pointer(SQL_CURSOR_STATIC), SQL_IS_UINTEGER)); It returns from SQLExecute instantly now, so that's good. But when going through all rows, it still takes a lot of memory, as if all blobs are instantiated in memory. What could cause this? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |