Skip to Content.
Sympa Menu

freetds - Re: [freetds] quick ODBC test

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] quick ODBC test
  • Date: Tue, 6 Dec 2005 16:18:37 +0100

>
> Could someone with Perl, unixODBC, and a current snapshot run a little
> test for me?
>
> CREATE proc t
> as begin
> select 'Here is the first row' as FirstResult
> raiserror( 'This is an example error message.', 9, 1)
> select 'Here is the last row' as LastResult
> end
>
> $ perl -w samples/odbc_rpc.pl -D $DSN -U $USER -P $P t
>
> I would like to know if all three lines are returned.
>
> In 0.63, the error message is discarded. Before we release 0.64, I'd
> like to confirm again that it now works correctly.
>
> These are my results from April 2005:
>
> $ TDSDUMP=dump perl -w samples/odbc_rpc.pl -D $DSN -U $USER -P $P t;
> head dump
> Binding parameter #1, the return code
> Executing: "{? = call t }" with parameters ''
> execute returned: '-1'
> Result #1:
> [FirstResult]
> 'Here is the first row'
> DBD::ODBC::st fetchrow failed: [unixODBC][FreeTDS][SQL
> Server]This is an
> example error message. (SQL-)(DBD: st_fetch/SQLMoreResults err=-1) at
> /usr/users/home/jklowden/projects/freetds.cvs/freetds/samples/
> odbc_rpc.p
> l line 96.
> 'Here is the first row'
> 'Here is the last row'
> 13:17:11.930179 Starting log file for FreeTDS 0.63
> on 2005-04-07 13:17:11 with debug level 99.
> 13:17:11.930385 Using trivial iconv from
> ../../../src/replacements/iconv.c
>
> I don't use ODBC, but I'd like to promise (correctly) that the
> results-error-results bug has been fixed.
>
> (I know this has been discussed before. I'm sorry if it's redundant.)
>
> Many thanks.
>

Result:
---------------------------------------
odbc_async_exec is: 0
Binding parameter #1, the return code

Executing: "{? = call t }" with parameters ''
execute returned: '-1'
Result #1:
[FirstResult]
'Here is the first row'
Result #2:
[LastResult]
'Here is the last row'
16:10:57.238590 (util.c:288):Starting log file for FreeTDS
0.64.dev.20051206
on 2005-12-06 16:10:57 with debug flags 0x6fff.
16:10:57.239152 (iconv.c:195):names for ISO-8859-1: ISO-8859-1
16:10:57.239274 (iconv.c:195):names for UTF-8: UTF-8
16:10:57.239384 (iconv.c:195):names for UCS-2LE: UCS-2LE
16:10:57.239506 (iconv.c:195):names for UCS-2BE: UCS-2BE
16:10:57.239617 (iconv.c:361):iconv to convert client-side data to the
"ISO-8859-1" character set
16:10:57.239868 (iconv.c:514):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
16:10:57.240109 (iconv.c:514):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
16:10:57.240308 (net.c:168):Connecting to 10.41.48.40 port 1433.
---------------------------------------

Changing raiserror from 9 to 11 (9 is not an error but a warning)

---------------------------------------
odbc_async_exec is: 0
Binding parameter #1, the return code

Executing: "{? = call t }" with parameters ''
execute returned: '-1'
Result #1:
[FirstResult]
'Here is the first row'
===> state: msg: This is an example error message.
DBD::ODBC::st fetchrow failed: (DBD: st_fetch/SQLFetch err=-1) at
./samples/odbc_rpc.pl line 121.
16:10:57.238590 (util.c:288):Starting log file for FreeTDS
0.64.dev.20051206
on 2005-12-06 16:10:57 with debug flags 0x6fff.
16:10:57.239152 (iconv.c:195):names for ISO-8859-1: ISO-8859-1
16:10:57.239274 (iconv.c:195):names for UTF-8: UTF-8
16:10:57.239384 (iconv.c:195):names for UCS-2LE: UCS-2LE
16:10:57.239506 (iconv.c:195):names for UCS-2BE: UCS-2BE
16:10:57.239617 (iconv.c:361):iconv to convert client-side data to the
"ISO-8859-1" character set
16:10:57.239868 (iconv.c:514):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
16:10:57.240109 (iconv.c:514):tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
16:10:57.240308 (net.c:168):Connecting to 10.41.48.40 port 1433.
---------------------------------------

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page