Skip to Content.
Sympa Menu

freetds - Re: Improving DBD::Sybase support, suggestion

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Improving DBD::Sybase support, suggestion
  • Date: Thu, 16 Dec 1999 11:26:23 -0800 (PST)


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? ( :-) )

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




Archive powered by MHonArc 2.6.24.

Top of Page