freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Brian Bruns" <camber AT ais.org>
- To: freetds
- Subject: Re: Improving DBD::Sybase support, suggestion
- Date: Thu, 16 Dec 1999 16:18:11
On 12/16/99, "Michael Peppler <mpeppler AT peppler.org>" wrote:
> Adrian Blakey writes:
> > In some offline email with Michael Peppler I was told that
> ct_capability()
> > currently always returns false. The result from this is used by
> DBD::Sybase
> > to determine whether things like parameterized queries are supported (?
> > placeholders).
> >
> > Is improving ct_capability on the near-term todo list? ( :-) )
>
We started returning false to make DBD::Sybase test happy. It then went on
the long term todo list. Problem is I know that sybase supports some of
this from the server end, but I'm not exactly sure how. If somebody sends
me a script that uses placeholders I can probably see what is going on, and
then we'll know how difficult it is. The other approach is to simply
implement it all on the client side, which has the advantage of working
against older Sybase engines and MS SQL as well.
Brian
> Specifically there are a few calls that would need to be supported:
>
> CS_BOOL val;
> CS_RETCODE ret = ct_capability(imp_dbh->connection, CS_GET,
> CS_CAP_REQUEST,
> CS_REQ_DYN, (CS_VOID*)&val);
>
> is used to test for the "dynamic sql" capability.
>
> ret = ct_dynamic(imp_sth->cmd, CS_PREPARE, imp_sth->dyn_id,
> CS_NULLTERM, statement, CS_NULLTERM);
>
> is needed to "prepare" a "dynamic" statement (one that includes
> ?-style placeholders)
>
> ret = ct_dynamic(imp_sth->cmd, CS_DESCRIBE_INPUT, imp_sth->dyn_id,
> CS_NULLTERM, NULL, CS_UNUSED);
>
> Is used to get information on the parameters that are represented by
> the ? placeholders (this is btw much superior to most other data
> engines - most don't provide this capability (or at least that's what
> I understand from the DBI mailing list...)
>
> if(ct_dynamic(imp_sth->cmd, CS_EXECUTE, imp_sth->dyn_id, CS_NULLTERM,
> NULL, CS_UNUSED) != CS_SUCCEED)
>
> Execute the dynamic statement.
>
> ret = ct_dynamic(imp_sth->cmd, CS_DEALLOC, imp_sth->dyn_id,
> CS_NULLTERM, NULL, CS_UNUSED);
>
> Dealloc (drop) the dynamic statement.
>
> Michael
> --
> Michael Peppler -||- Data Migrations Inc.
> mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
> Int. Sybase User Group -||- http://www.isug.com
> Sybase on Linux mailing list: ase-linux-list AT isug.com
-
Improving DBD::Sybase support, suggestion,
Adrian Blakey, 12/16/1999
- <Possible follow-up(s)>
- Re: Improving DBD::Sybase support, suggestion, Michael Peppler, 12/16/1999
- Re: Improving DBD::Sybase support, suggestion, Brian Bruns, 12/16/1999
- Re: Improving DBD::Sybase support, suggestion, Mark Schaal, 12/16/1999
- Re: Improving DBD::Sybase support, suggestion, Michael Peppler, 12/17/1999
Archive powered by MHonArc 2.6.24.