Skip to Content.
Sympa Menu

freetds - Re: unimplemented ctlib functions and Roguewave

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: unimplemented ctlib functions and Roguewave
  • Date: 07 Nov 2002 22:05:23 +0100


>
> I know some people were working on parameters/dynamic statements etc. Will
> this work get us towards an implementation of ct_setparam() and is it
> approaching readiness yet ?
>

I'm working on dynamic (and other smallest stuff too), it seem to work
on ODBC but not using TDS 4.2 (only tested with 5.0, 7.0 tested but
partially).

Simply:
1- prepare your query with tds_submit_prepare
2- use tds_free_input_params to free list of parameters
3- tds_alloc_param_result tds_alloc_param_row to allocate space for
parameters
3- copy data to parameters
4- call tds_submit_execute to execute your query
5- iterate steps 2-4 if needed
6- call tds_submit_unprepare to delete prepared statement

Work to do:
- find a better way instead of freeing all parameters for every call to
tds_submit_execute
- handle copy of data for all data (ODBC code, work only for char...)
- write code for working with TDS4.2. If mssql we can call same store
procedure (mssql handle dynamic query with some system store procedure),
borrow code from ODBC (prepare_call.c)
- test (different data and other...)
- retrieve params types (Sybase and 5.0)

Some changes run also in my mind...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page