You are not logged in.
Pages: 1
Hi
We are writing a nexusDB driver, and using a unit test to accomplish this. In order to perform a basic test we have first created a unit test based on sample code.
Apart from that we have created a small sample application that simply dumps and rereads some objects from the oracle database.
The code in TestOracle.rar appears to run just fine, whereas the code in our unittest.rar crashes for some reason, and it is basically the same code.
I am lost here, maybe you can pinpoint me at (probably mine) the error. (Let's see if I can add the attachments ...)
function TSQLRest.InternalListRecordsJSON(Table: TSQLRecordClass;
const WhereClause: RawUTF8): TSQLTableJSON;
VAR aSQL:RawUTF8;
begin
if (self=nil) or (Table=nil) then
result := nil else
begin
aSQL:=Table.RecordProps.SQLFromSelectWhere('*',WhereClause); << MESSES UP THE HEAP/STACK ? // separated in 2 lines for easier debugging
result := InternalListJSON(Table,aSQL); <<CRASH!
end;
// result := InternalListJSON(Table,
// Table.RecordProps.SQLFromSelectWhere('*',WhereClause));
end;
the rar of the working code can be found here:
http://www.sg-assetmanagement.nl/secret … Oracle.rar
And expects itself to run from ./sqlite3/sample/testoracle
the rar of the crasjhing unit test (XE2) can be found here:
http://www.sg-assetmanagement.nl/secret … itTest.rar
and expects to compile and run from a folder 'UnitTest' wich is a brother folder of the SQLite3 folder.
We are running oracle 10g, and we have copied the OCI DLL's and support files into the executable output folders. (I believe this approach called "Oracle InstantClient")
Regards - Hans
Last edited by h.hasenack (2012-08-21 08:09:11)
Offline
BEFORE you put time in this, obviously I needed to sleep a little more ... I found the error: I Freed the client after filling it with data.
I apologize. - Thnx.
Last edited by h.hasenack (2012-08-21 08:27:21)
Offline
Pages: 1