Skip to Content.
Sympa Menu

freetds - RE: [freetds] results processing in freetds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] results processing in freetds
  • Date: Wed, 8 Oct 2003 15:35:51 +0100

Hi Freddy,

as usual , you manage to get across a lot of information in just a few
sentences, unlike me!

let me try and get what you've said straight in my own head....

> I think we should work on curr_resinfo.. This pointer point to current
result and can be res_info or cur_dyn->res_info. token.c just write to
curr_resinfo (or it should)...

So - you're saying that token.c should just operate on tds->curr_resinfo ,
and should never set tds->curr_resinfo - that being responsibility of
whatever calls the token.c functions...

> When we want to get some rows from cursors we just set curr_resinfo to our
cursor->res_info.

And the implication is that when we wanted to get some rows from a normal
query, we would have to set curr_resinfo to tds->res_info

> Problem is compute. I think is a good idea to add a TDSCOMPUTEINFO
**comp_info to TDSRESULTINFO structure and remove from TDSSOCKET.

Interested to know why you think they are a problem. If I told you that
"compute" clauses are forbidden in SQL statements used to open cursors,
would the problem go away ?

> This was just prepared for cursors as declared in an very old mail...
strangely you add curr_resinfo for this stuff..

I don't understand what you're saying here.

Some other points:

1) We'll need an array or linked list of TDSCURSORINFO structures, as you
can have more than one open cursor on the connection.

2) token.c (tds_process_result or other) will have to allocate the
TDSRESULTINFO storage, as only it knows how many columns have been returned
in the result set.
How's it going to know which TDSRESULTINFO * should point to the
allocated storage ? remember the results token from a cursor open looks just
like an ordinary results token...


Thanks for the help Freddy...


Bill







Archive powered by MHonArc 2.6.24.

Top of Page