Skip to Content.
Sympa Menu

freetds - [freetds] Cursors changes in 0.64

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Cursors changes in 0.64
  • Date: Mon, 6 Dec 2004 13:01:10 +0100

I changed a bit how dynamic and cursors work in 0.64.
Now dynamics and cursors are stored in TDSSOCKET using a linked list and
a pointer to current dynamic/cursor (cur_dyn/dyns and
cur_cursor/cursors).
tds_cursor_* functions accept a TDSCURSOR* pointer instead of a
cursor_id.
CTLib use a direct TDSCURSOR* pointer instead of client_cursor_id. For
this reason I removed client_cursor_id from TDSCURSOR (not used
anymore).
Now there is only a sligtly difference between dynamic and cursor
bahavior:
1) dynamic get created calling tds_submit_prepare (which call
tds_alloc_dynamic) while cursors are allocated using tds_alloc_cursor
2) cursors get freed by tds_cursor_dealloc while tds_submit_prepare do
not free dynamic

1) I don't know what behavior it's better...
2) in ODBC I have a problem freeing dynamic if tds state it's not idle
cause I need to close dynamic on server side too. Perhaps it's better to
call a function in libTDS that in this case store dynamic and free it
when possible. Personally if a client library call tds_alloc_* it should
be better that client library call tds_free_* too so perhaps it would be
better if libTDS allocate cursor declaring cursor (tds_cursor_declare)

freddy77



  • [freetds] Cursors changes in 0.64, ZIGLIO, Frediano, VF-IT, 12/06/2004

Archive powered by MHonArc 2.6.24.

Top of Page