Skip to Content.
Sympa Menu

freetds - [freetds] Parameters mystery solved

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Philip" <philip_38 AT hotmail.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Parameters mystery solved
  • Date: Wed, 29 Jun 2005 13:22:47 -0400


The mystery of how the parameters work is this: if the freetds.conf file
shows as "default TDS version" to other than 4.2, then the parameter passing
with SQL server don't work. Even if your server's definition shows version
8.0, as it should for SQL Server.

I think this is a FreeTDS bug, because I see no logical relationship between
this parameter and the operation of your connection. The version associated
with your server definition should be enough. The parameters should work
regardless.

Federico Alves
-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
freetds-request AT lists.ibiblio.org
Sent: Wednesday, June 29, 2005 12:00 PM
To: freetds AT lists.ibiblio.org
Subject: FreeTDS Digest, Vol 29, Issue 31

Send FreeTDS mailing list submissions to
freetds AT lists.ibiblio.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ibiblio.org/mailman/listinfo/freetds
or, via email, send a message with subject or body 'help' to
freetds-request AT lists.ibiblio.org

You can reach the person managing the list at
freetds-owner AT lists.ibiblio.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of FreeTDS digest..."


Today's Topics:

1. invalid cursor state (fred)
2. invalid cursor state (fred)
3. invalid cursor state (fred)
4. query and tds_set_state (Frediano Ziglio)


----------------------------------------------------------------------

Message: 1
Date: Tue, 28 Jun 2005 11:44:11 -0500
From: "fred" <fred AT fredsnet.org>
Subject: [freetds] invalid cursor state
To: freetds AT lists.ibiblio.org
Message-ID: <E1DnJBz-0005vX-FV AT box6.illusionfxnet.com>
Content-Type: text/plain; charset=iso-8859-1

greetings folks.

I have a redhat linux AS3 server and I've installed Oracle 10g (release
10.0.3. for 32 bit linux) We have HS services running. I have unixODBC-
2.2.8-2.3.0.2 rpm from redhat installed as well as the devel package.

I've downloaded the latest stable release from freetds' website ver 0.63
and compiled it with these options.
/configure --prefix=/usr --sysconfdir=/etc --with-tdsver=8

my database name is perfx, and the database link is peis
from sqlplus at my desktop connected to the database perfx,
when I run

SQL> select * from Actions@PEIS

I get------

ERROR:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC][unixODBC][FreeTDS][SQL Server]Invalid
cursor
state (SQL State: 24000; SQL Code: 0)
ORA-02063: preceding 2 lines from PEIS
no rows selected

when I run
]
SQL> describe Actions@PEIS

I get ----

Name Null? Type
----------------------------------------- -------- --------------------
--
ActionID NOT NULL NUMBER(10)
ActionNumber NUMBER(10)
Assignee VARCHAR2(50)
AssigneeID VARCHAR2(50)
Subject VARCHAR2(80)
Originator VARCHAR2(50)
OriginatorID VARCHAR2(50)
DateOpened DATE
DateDue DATE
DateCompleted DATE
DateRejected DATE
DateClosed DATE
Priority VARCHAR2(40)
Description LONG
Result LONG
Category VARCHAR2(40)
ReferenceID VARCHAR2(50)
Reference VARCHAR2(40)
Reviewed NOT NULL NUMBER(10)
ActionType NUMBER(5)
Flags VARCHAR2(32512 CHAR)
Alert NOT NULL NUMBER(3)
ExternalDueDate DATE
ActionLocation VARCHAR2(40)
ActionNotes LONG
ActionSource VARCHAR2(40)
ArchiveFlag NUMBER(10)

SQL>


any tips on what I should do?


Thanks

Fred

--



------------------------------

Message: 2
Date: Tue, 28 Jun 2005 11:44:17 -0500
From: "fred" <fred AT fredsnet.org>
Subject: [freetds] invalid cursor state
To: freetds AT lists.ibiblio.org
Message-ID: <E1DnJC5-0005wa-EE AT box6.illusionfxnet.com>
Content-Type: text/plain; charset=iso-8859-1

greetings folks.

I have a redhat linux AS3 server and I've installed Oracle 10g (release
10.0.3. for 32 bit linux) We have HS services running. I have unixODBC-
2.2.8-2.3.0.2 rpm from redhat installed as well as the devel package.

I've downloaded the latest stable release from freetds' website ver 0.63
and compiled it with these options.
/configure --prefix=/usr --sysconfdir=/etc --with-tdsver=8

my database name is perfx, and the database link is peis
from sqlplus at my desktop connected to the database perfx,
when I run

SQL> select * from Actions@PEIS

I get------

ERROR:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC][unixODBC][FreeTDS][SQL Server]Invalid
cursor
state (SQL State: 24000; SQL Code: 0)
ORA-02063: preceding 2 lines from PEIS
no rows selected

when I run
]
SQL> describe Actions@PEIS

I get ----

Name Null? Type
----------------------------------------- -------- --------------------
--
ActionID NOT NULL NUMBER(10)
ActionNumber NUMBER(10)
Assignee VARCHAR2(50)
AssigneeID VARCHAR2(50)
Subject VARCHAR2(80)
Originator VARCHAR2(50)
OriginatorID VARCHAR2(50)
DateOpened DATE
DateDue DATE
DateCompleted DATE
DateRejected DATE
DateClosed DATE
Priority VARCHAR2(40)
Description LONG
Result LONG
Category VARCHAR2(40)
ReferenceID VARCHAR2(50)
Reference VARCHAR2(40)
Reviewed NOT NULL NUMBER(10)
ActionType NUMBER(5)
Flags VARCHAR2(32512 CHAR)
Alert NOT NULL NUMBER(3)
ExternalDueDate DATE
ActionLocation VARCHAR2(40)
ActionNotes LONG
ActionSource VARCHAR2(40)
ArchiveFlag NUMBER(10)

SQL>


any tips on what I should do?


Thanks

Fred

--



------------------------------

Message: 3
Date: Tue, 28 Jun 2005 11:47:14 -0500
From: "fred" <fred AT fredsnet.org>
Subject: [freetds] invalid cursor state
To: freetds AT lists.ibiblio.org
Message-ID: <E1DnJEw-0006BL-1p AT box6.illusionfxnet.com>
Content-Type: text/plain; charset=iso-8859-1

greetings folks.

I have a redhat linux AS3 server and I've installed Oracle 10g (release
10.0.3. for 32 bit linux) We have HS services running. I have unixODBC-
2.2.8-2.3.0.2 rpm from redhat installed as well as the devel package.

I've downloaded the latest stable release from freetds' website ver 0.63
and compiled it with these options.
/configure --prefix=/usr --sysconfdir=/etc --with-tdsver=8

my database name is perfx, and the database link is peis
from sqlplus at my desktop connected to the database perfx,
when I run

SQL> select * from Actions@PEIS

I get------

ERROR:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC][unixODBC][FreeTDS][SQL Server]Invalid
cursor
state (SQL State: 24000; SQL Code: 0)
ORA-02063: preceding 2 lines from PEIS
no rows selected

when I run
]
SQL> describe Actions@PEIS

I get ----

Name Null? Type
----------------------------------------- -------- --------------------
--
ActionID NOT NULL NUMBER(10)
ActionNumber NUMBER(10)
Assignee VARCHAR2(50)
AssigneeID VARCHAR2(50)
Subject VARCHAR2(80)
Originator VARCHAR2(50)
OriginatorID VARCHAR2(50)
DateOpened DATE
DateDue DATE
DateCompleted DATE
DateRejected DATE
DateClosed DATE
Priority VARCHAR2(40)
Description LONG
Result LONG
Category VARCHAR2(40)
ReferenceID VARCHAR2(50)
Reference VARCHAR2(40)
Reviewed NOT NULL NUMBER(10)
ActionType NUMBER(5)
Flags VARCHAR2(32512 CHAR)
Alert NOT NULL NUMBER(3)
ExternalDueDate DATE
ActionLocation VARCHAR2(40)
ActionNotes LONG
ActionSource VARCHAR2(40)
ArchiveFlag NUMBER(10)

SQL>


any tips on what I should do?


Thanks

Fred

--



------------------------------

Message: 4
Date: Tue, 28 Jun 2005 21:43:36 +0200
From: Frediano Ziglio <freddyz77 AT tin.it>
Subject: [freetds] query and tds_set_state
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Message-ID: <1119987816.3024.10.camel@freddy>
Content-Type: text/plain

Reviewing query.c (libTDS) it appear that it contains two types of
functions
- functions to send requests (tds_submit_*, tds_cursor_*)
- functions to parse query (tds_quote*, tds_skip*...)
there isn't also a big difference from high level and low level (like
wire language query and query, just tds_submit_query do it's best to
send a query whatever token/packet it use)
I noted also that tds_cursor_* already introduce the concept of
"multiple query" (Cf "multiple query, OTL, array_out" recently) however
there is no setup, first query that enter in multiple query try to set
state to TDS_QUERYING (that is I'm sending a query).

Test to send query is

if (tds_set_state(tds, TDS_QUERYING) != TDS_QUERYING)
return TDS_FAIL;

this is bad. If state was already TDS_QUERYING it try to set state, in
tds_set_state


case TDS_QUERYING:

if (tds->state == TDS_DEAD) {
tds_client_msg(tds->tds_ctx, tds, 20006, 9, 0, 0, "Write to SQL
Server failed.");
return tds->state;
} else if (tds->state != TDS_IDLE) {
tdsdump_log(TDS_DBG_ERROR, "tds_submit_query(): state is PENDING
\n");
tds_client_msg(tds->tds_ctx, tds, 20019, 7, 0, 1,
"Attempt to initiate a new SQL Server operation with
results pending.");
return tds->state;
}

so it give error but continue... quite bad (mainly for thread reasons).
Perhaps tds_set_state should return TDS_SUCCEED/TDS_FAIL ??

freddy77




------------------------------

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


End of FreeTDS Digest, Vol 29, Issue 31
***************************************




Archive powered by MHonArc 2.6.24.

Top of Page