freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] osql and isql -- how to test ODBC config?
- From: Tony Esposito <Tony.Esposito AT region10.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, "freetds-bounces AT lists.ibiblio.org" <freetds-bounces AT lists.ibiblio.org>, "James K. Lowden" <jklowden AT freetds.org>
- Cc: Tony Esposito <Tony.Esposito AT region10.org>
- Subject: Re: [freetds] osql and isql -- how to test ODBC config?
- Date: Wed, 19 Sep 2012 16:39:22 +0000
James, Frediano,
The ANSI standard error code 100 stands for 'no rows found', as
Frediano pointed out.
Question: Given that this may be an 'isql' error and that 'tsql'
works, would the ODBC layer actually be working and it is just that we need
another way to test it? (Maybe not since bsqlodbc does not work.)
I guess I need to know the next step, if there is any, to take.
James,
TDSDUMP file from an execution of bsqlodbc attached -- seems Frediano
has a point as the dunp file shows SQLExecute returning SQL_NO_DATA.
Just a reminder: I am attempting to access Sybase Anywhere 10. Could it be
that FreeTDS 0.91 was never fully tested against Sybase Anywhere 10 since
version 10 is so old?
Appreciate all the help, guys. You've been a pleasure to work with. And we
will get this figured out. :-)
Tony Esposito
ETL Developer
Information Services Programming
Region 10 Education Service Center
400 E Spring Valley Rd
Richardson, TX 75081
(Ph) 972-348-1284
(Fax) 972-348-1285
Reveal Data Analytics
-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Frediano Ziglio
Sent: Wednesday, September 19, 2012 4:20 AM
To: FreeTDS Development Group
Subject: Re: [freetds] osql and isql -- how to test ODBC config?
2012/9/19 James K. Lowden <jklowden AT freetds.org>:
> On Tue, 18 Sep 2012 19:56:14 +0000
> Tony Esposito <Tony.Esposito AT region10.org> wrote:
>
>> (1) Set my MANPATH so now I can find the man pages for bsqlodbc.
>
> Hurrah!
>
>> (2) Ran bsqlodbc and get the following:
>>
>> user #> bsqlodbc -U dba -P sql -S txeis -D DB246111 -i input.sql -o
>> output.sql -e error.sql
>>
>> Input file input.sql contents: select * from sr_stu_demo;
>> Output file output.sql contents: <empty>
>> Error file error.sql contents: bsqlodbc: error: 100 is an
>> unknown return code for SQLExecute
>
> As I suspected, a missing error message. But why?
>
> The number 100 has some significance but shouldn't show up in this
> context. The TDS library can return error 100 to indicate iconv is
> not supported for TDS protocol version 7.3, but you're using TDS 5.0
> and the error's being returned from SQLExecute, not SQLConnect.
>
> I'm afraid all I can suggest is to use TDSDUMP with the above command
> and, and lets have another look at the output. The log will show a
> lot of the call stack. It might yield a clue of where to look.
>
> You have found a bug, by definition. I think there's something funny
> in your configuration, something you'll easily be able to fix. The
> bug is that you shouldn't be able to get the system to produce that
> message, no matter what you do. So I am interested in how it
> happened.
>
No, 100 in ODBC is SQL_NO_DATA. From documentation SQLExecute/SQLExecDirect
should return SQL_NO_DATA if not data are returned. It seems that MS ODBC
never return this value. I think that I changed (not in 0.91!) our driver to
return SQL_NO_DATA according to MS ODBC. However it's a bug in isql in this
case.
Frediano
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2221 / Virus Database: 2441/5277 - Release Date: 09/19/12
0050 0a fd 00 00 01 00 00 00-00 00 |........ ..|
token.c:337:looking for login token, got e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2493:server indicated charset change to "iso_1"
iconv.c:988:setting server single-byte charset to "ISO-8859-1"
token.c:337:looking for login token, got e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2477:changing block size from 512 to 512
token.c:337:looking for login token, got ad(LOGINACK)
token.c:373:server reports TDS version 5.0.0.0
token.c:375:Product name for 0x5000000 is unknown
token.c:337:looking for login token, got e2(CAPABILITY)
token.c:122:tds_process_default_tokens() marker is e2(CAPABILITY)
token.c:337:looking for login token, got fd(DONE)
token.c:122:tds_process_default_tokens() marker is fd(DONE)
token.c:2339:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2355:tds_process_end() state set to TDS_IDLE
token.c:2370: rows_affected = 0
token.c:438:tds_process_login_tokens() returning TDS_SUCCEED
odbc.c:4916:SQLGetFunctions: fFunction is 999
odbc.c:5831:SQLGetInfo(0x15061d50, 77, 0x7fff1bc9fd40, 20, (nil))
odbc.c:5085:_SQLGetInfo(0x15061d50, 77, 0x7fff1bc9fd40, 20, (nil))
odbc.c:5831:SQLGetInfo(0x15061d50, 10000, 0x7fff1bc9fd40, 5, (nil))
odbc.c:5085:_SQLGetInfo(0x15061d50, 10000, 0x7fff1bc9fd40, 5, (nil))
odbc.c:1716:SQLAllocStmt(0x15061d50, 0x15084020)
odbc.c:1615:_SQLAllocStmt(0x15061d50, 0x15084020)
odbc.c:4388:SQLGetStmtAttr(0x15084270, 10010, 0x7fff1bca0e98, 8, (nil))
odbc.c:4388:SQLGetStmtAttr(0x15084270, 10011, 0x7fff1bca0e98, 8, (nil))
odbc.c:4388:SQLGetStmtAttr(0x15084270, 10012, 0x7fff1bca0e98, 8, (nil))
odbc.c:4388:SQLGetStmtAttr(0x15084270, 10013, 0x7fff1bca0e98, 8, (nil))
odbc.c:4445:SQLPrepare(0x15084270, select * from sr_stu_demo
, -3)
odbc.c:4490:Creating prepared statement
mem.c:615:tds_free_all_results()
util.c:156:Changed query state from IDLE to QUERYING
util.c:156:Changed query state from QUERYING to PENDING
net.c:741:Sending packet
0000 0f 01 00 4e 00 00 00 00-e7 43 00 01 00 0a 69 6f |...N.... .C....io|
0010 74 72 32 38 36 30 30 30-34 00 63 72 65 61 74 65 |tr286000 4.create|
0020 20 70 72 6f 63 20 69 6f-74 72 32 38 36 30 30 30 | proc io tr286000|
0030 20 61 73 20 73 65 6c 65-63 74 20 2a 20 66 72 6f | as sele ct * fro|
0040 6d 20 73 72 5f 73 74 75-5f 64 65 6d 6f 0a |m sr_stu _demo.|
token.c:540:tds_process_tokens(0x15062360, 0x7fff1bca0dfc, 0x7fff1bca0df8,
0x104)
util.c:156:Changed query state from PENDING to READING
net.c:555:Received header
0000 04 01 00 21 00 00 00 00- |...!....|
net.c:609:Received packet
0000 04 01 00 21 00 00 00 00-e7 0d 00 20 00 0a 69 6f |...!.... ... ..io|
0010 74 72 32 38 36 30 30 30-fd 00 00 01 00 00 00 00 |tr286000 ........|
0020 00 - |.|
token.c:555:processing result tokens. marker is e7(TDS5_DYNAMIC)
token.c:555:processing result tokens. marker is fd(DONE)
token.c:2339:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2355:tds_process_end() state set to TDS_IDLE
util.c:156:Changed query state from READING to IDLE
token.c:2370: rows_affected = 0
util.c:104:logic error: cannot change query state from IDLE to PENDING
token.c:540:tds_process_tokens(0x15062360, 0x7fff1bca0dfc, 0x7fff1bca0df8,
0x104)
token.c:543:tds_process_tokens() state is COMPLETED
odbc.c:3496:SQLExecute(0x15084270)
prepare_query.c:203:parsing 0 parameters
odbc.c:3211:_SQLExecute(0x15084270)
odbc.c:3216:_SQLExecute() starting with state 0
odbc.c:3334:End prepare, execute
query.c:1818:tds_submit_execute()
mem.c:615:tds_free_all_results()
util.c:156:Changed query state from IDLE to QUERYING
util.c:156:Changed query state from QUERYING to PENDING
net.c:741:Sending packet
0000 0f 01 00 1a 00 00 00 00-e7 0f 00 02 00 0a 69 6f |........ ......io|
0010 74 72 32 38 36 30 30 30-00 00 |tr286000 ..|
token.c:540:tds_process_tokens(0x15062360, 0x7fff1bca0d94, 0x7fff1bca0d90,
0x6914)
util.c:156:Changed query state from PENDING to READING
net.c:555:Received header
0000 04 01 00 21 00 00 00 00- |...!....|
net.c:609:Received packet
0000 04 01 00 21 00 00 00 00-e7 0d 00 20 00 0a 69 6f |...!.... ... ..io|
0010 74 72 32 38 36 30 30 30-fd 00 00 01 00 00 00 00 |tr286000 ........|
0020 00 - |.|
token.c:555:processing result tokens. marker is e7(TDS5_DYNAMIC)
token.c:555:processing result tokens. marker is fd(DONE)
token.c:2339:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2355:tds_process_end() state set to TDS_IDLE
util.c:156:Changed query state from READING to IDLE
token.c:2370: rows_affected = 0
util.c:104:logic error: cannot change query state from IDLE to PENDING
odbc.c:3534:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3535: result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3578:odbc_process_tokens: processed TDS_DONE_RESULT
token.c:540:tds_process_tokens(0x15062360, 0x7fff1bca0d94, 0x7fff1bca0d90,
0x26914)
token.c:543:tds_process_tokens() state is COMPLETED
odbc.c:3534:odbc_process_tokens: tds_process_tokens returned 2
odbc.c:3535: result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3374:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:3519:SQLExecute returns SQL_NO_DATA
-
Re: [freetds] osql and isql -- how to test ODBC config?
, (continued)
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/16/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Frediano Ziglio, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/17/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Frediano Ziglio, 09/19/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/19/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/19/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/20/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Frediano Ziglio, 09/20/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Frediano Ziglio, 09/26/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/26/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/19/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, Tony Esposito, 09/18/2012
- Re: [freetds] osql and isql -- how to test ODBC config?, James K. Lowden, 09/18/2012
Archive powered by MHonArc 2.6.24.