Skip to Content.
Sympa Menu

freetds - RE: [freetds] obtaining statement type information

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] obtaining statement type information
  • Date: Tue, 20 Apr 2004 12:23:17 +0200

>
> It looks to me like if you have a statement handle,
> calling SQLGetDiagField with an argument of
> SQL_DIAG_DYNAMIC_FUNCTION_CODE is the ODBC way to find out
> what kind of statement it is (insert, select, update, etc...)
>
> Question 1 - is that right?
>

Yes

> It looks like freetds 0.62.3 does not implement this function
> currently, there's a TODO marker there.
>
> Question 2 - is that right?
>

Yes and not. It returns an empty string, that is an unknown statement.
Drivers are not required to support this option, they can return
unknown.

> I very much would like to be able to determine this information,
> if possible after a statement is prepared, and before it is executed
> (this is how I do it in the OCI application that I'm porting)
>
> Question 3 - is this possible in any way with freetds?
>

Not currently under FreeTDS and is implementable only using mssql7+ (not
Sybase, not mssql < 7). Not that difficult to code but not so important
to me...

> Thanks for any tips.
>
> roger

bye
freddy77




Archive powered by MHonArc 2.6.24.

Top of Page