Re: SQLGetTypeInfo() fails when it is called for the second time (10/08/2008 Dmitry Basko)

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
marko68 GMX wrote:
> 
> find_an_appropriate_data_type(...)
> {
>  SQLBindCol(hToStmt, 1, SQL_C_CHAR, szTypeName ...);
>  SQLBindCol(hToStmt, 3, SQL_C_LONG, &cbMaxPrec,...);
>  ...
>  SQLGetTypeInfo(hstmt, fSqlType) (where fSqlType is 5 (small integer))
>  SQLFetch(hstmt);
>  ...
>  SQLFreeStmt(hstmt, SQL_CLOSE);
>  
>  if !(does_the_found_MS_SQL_data_type_suit_us)
>     try another one;
> }
>  The main idea behind this cycle is an attempt to figure out the right
>  correspondence between available (supported by the application) data
>  types and the ones supported by MS SQL. The first call of the
>  function returns the requested type info, but the second call
>  fails: SQLGetTypeInfo returns -1. The call of SQLGetDiagRec
>  returns the following error:
> 
>  08S01 - [FreeTDS][SQL Server]Communication link failure

Please post a TDSDUMP log of the session.  Perhaps that will shed some
light.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.