[freetds] TDS_DONE_TOKEN (and others)
freddyz77 at tin.it
Wed Apr 30 15:08:48 EDT 2003
> > I was holding back on finishing these changes until James is
> > finished and
> > the code settles down a bit after the charset changes....
> I hope to commit compilable, minimally working code this weekend, so we can
> synch up. I think it's important to keep you informed of data structure and
> header changes. I don't expect my other changes (e.g. in bcp.c) to matter
> very much to you; I'm trying to make them transparent.
> It's 90% done, so there's only 90% more to go, you know.
> "minimally working" means unit tests work for ASCII and UTF-8 clients
> against a TDS 7.0 server. Beyond that lies finding corner cases, which you
> might as well be a part of. :-) Further down the road is UCS-2 clients
> and/or UTF-8 servers, but these are both generalization problems. The data
> structures we have now should (famous last words...) suffice.
I putted some "FIXME ICONV" in query.c. Mainly some sizes are needed
before sending string...
Also our library do not work with non ASCII extended charset. It this a
problem? Some code require query parsing, so extended ascii charset
(even utf8) work, ebcdici (how to write it?) not!
I renamed TDS_COMPLETED in TDS_IDLE and changed code in query.c to test
this state instead of "PENDING". I also changed all server type define
to an enum. My intention is to use enum so compiler can provide better
warnings (working with ODBC I have server type, odbc server type and
odbc c type... a lot of confusion... also there are 4 function to
convert from a type to another...)
Anyone know how to pass dynamic query to Sybase passing types? Can I
post a dynamic query like
create proc my_proc @pippo int as ... ??
In TDS7+ I do something like
sp_prepare @P1 out, '@pippo int', 'select @pippo', 1
sp_execute @P1, @param1, @param2 ...
When I issue an RPC no TDS_DONE is returned (last returned is
TDS_DONEPROC without continue). Perhaps we can test tds->state after
tds_process_results_token but this lead future problem when we implement
full thread-safe... I tried also to not process TDS_DONE* in
tds_process_row but many problems raise (6/7 unittests fail...)
Bill... can you post a patch on TDS_DONE work? Or your entire work?
More information about the FreeTDS