Skip to Content.
Sympa Menu

freetds - RE: structure of tds_typeinfo

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: structure of tds_typeinfo
  • Date: Mon, 24 Jun 2002 12:17:35 +0200


>
> does anybody know the structure of the table tds_typeinfo?
> I've install freetds0.53 and unixOdbc2.2.1 for lotus connect
> to sybase11
> on linux platform. I can use isql correctly in linux box, but
> lotus seems
> to use "SELECT * FROM tds_typeinfo where SQL_DATA_TYPE=?" from odbc.c,
> and all threads freeize if I comment the line.
> very thanks for your reply and advise.
>
See man pages (or other help) of SQLGetTypeInfo function.
Try to change SQLGetTypeInfo of freetds (src/odbc/odbc.c) in

SQLRETURN SQL_API SQLGetTypeInfo(
SQLHSTMT hstmt,
SQLSMALLINT fSqlType)
{
struct _hstmt *stmt;

CHECK_HSTMT;

stmt = (struct _hstmt *) hstmt;
static const char *sql_templ = "EXEC sp_datatype_info %d";
char sql[sizeof(*sql_templ)+20];
sprintf(sql, sql_templ, fSqlType);
if (SQL_SUCCESS!=odbc_set_stmt_query(stmt, sql, strlen(sql)))
return SQL_ERROR;

return _SQLExecute(hstmt);
}

This should work with mssql (from 6.5) and latest sybase version.

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page