Author Topic: ZeosLib 6.6.3 with Lazarus 0.9.24 beta and IZResultSet  (Read 3383 times)


  • Newbie
  • Posts: 1
ZeosLib 6.6.3 with Lazarus 0.9.24 beta and IZResultSet
« on: June 01, 2008, 06:14:50 pm »
Hi there.

I just started using Lazarus so I'll have to ask for your patience :)
Here's the thing: I'm using ZEOSLIB_TESTING_REV368 with LAZARUS 0.9.24 beta and I have to write a console application with these two. The program should read an sql query from a text file and execute it on first MSSQL server, then it has to write an INSERT statement (filled with earlier query results) and throw it to another MSSQL DB. My problem is that since I don't know the exact structure of insert statement, I have to count columns in query result, and IZResultSet doesn't have that functionality. I decided to write a few lines of code to do that and there they go:

Code: [Select]
col := 1;
        cond := True;
        while cond do begin
                 on E : Exception do
                    cond := False;
              col := col+1;

But even that simple piece of code gets crashed and I'm unable to read the right columns count. This crashes after 2 iterations and returns "Access Violation" exception.
I thought it maybe something with the GetBoolean function so I changed it to IsNull(ColIndex), but then I recevied "Row buffer is not assigned" exception.

Please help me with this one.

P.S. Maybe I should mention my sql query used for testing: "SELECT * FROM my_table;". This table has 5 columns.

P.S.2 Sorry for my english (most likely I have done some language mistakes).


TinyPortal © 2005-2018