Crash

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Aug 4 01:46:15 CDT 2015


Hi Mark,

> On Aug 3, 2015, at 5:52 PM, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:
> 
> Hi Ivan,
> 
> Thanks for your reply. If I replace vDatabase_SqlQuery() with vDatabase_SqlSelect() I get a record, so myCursor must be a cursor reference. If it weren't, it would be a bug in Valentina.

There are different methods. They are very similar but return different result types.
Doing "put vDatatabase_SqlQuery() into vCursorType" you just trying to treat result (vQueryResult) as vCursor.
But they are completely different types.

If you know what the nature of your query (like in this case - you know that result is cursor) you can use SqlSelect method.
But if the query is coming from somewhere or it is vary (say, there are tons of "if" in your app logic building query text) you can't be sure. For such cases you can use SqlQuery() which is able to perform both query types (execute and select) and return single result which can be as "affected record count" so "cursor".




-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list