Page 1 of 1

[patch_done] Error if param is null

Posted: 27.06.2012, 16:05
by cfc
hi,

I' have a problem when the param of query is Null

If the param is null "example: zquery1.parambyname('id').clear" when call de fuction LoadOracleVars in de line 413 of ZdbcOracleUtils (CurrentVar.Data := nil;) the reserved memory is lost and when other call the param have a value give an error.

If delete this line its ok, but i' dont know is CurrentVar.Indicator := -1 is suficient for detect all type that is null.

Sorry for my english.

Posted: 27.06.2012, 16:30
by EgonHugeist
cfc,

I think you're right. I took a quick look now. The oracle variables are initialized with getmem(). On nilling this data pointer can result your repoted issue. Which branch do you use? I did report an equal issue here: http://zeos.firmos.at/viewtopic.php?p=15391#15391 it can be that your solution does solve my issue too..

Is that thread http://zeos.firmos.at/viewtopic.php?t=3522 solved?

Michael

Posted: 27.06.2012, 18:25
by cfc
Michael,

Now i' m testing /branches/testing-egonhugeist.

Yes, the thread http://zeos.firmos.at/viewtopic.php?t=3522 is solved with this branch.

thanks.

cfc.

Posted: 27.06.2012, 20:28
by EgonHugeist
cfc,

i'd run our tests with your proposed fix. No new issues to see. I think the Indicator=-1 is is equal to CurrentVar = nil.

Also i've introduced a TZQuery.Properties value 'prefetch_count=x' whitch speeds up the select statements. Default value is 100.

Patch done Rev. eh1421 and Rev1420-testing.

Michael

Btw. don't worry about your english...