freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: RE: pre2?
- Date: Tue, 9 Jul 2002 11:31:47 -0700
Hi Brian, thanks for that patch, that did the trick!
I can now issue my usual ODBC test queries and I get something back.
There are still some issues with what actually gets returned, but the
results aren't too bad, and at least no worse off than before. I assume
these issues should be post-0.60 items.
So, the issues I was having with 0.60pre seem to be isolated if not yet
checked into CVS
1) The NUMERIC problem was fixed by a patch from Bill
2) This ODBC problem was fixed by this patch from Brian
3) The truncated TEXT problem is still twitching on the table, but the
two latest suggested code options out there both work for me.
When these patches are checked into CVS, I will roll it out on an
internal production server and kick it around.
Many thanks for all your help!
Eric
> -----Original Message-----
> From: Brian Bruns [mailto:camber AT ais.org]
> Sent: Tuesday, July 09, 2002 10:45 AM
> To: TDS Development Group
> Subject: [freetds] RE: pre2?
>
> Ok, here is what is going on. We normally return SQL_SUCCESS for
anything
> we don't support. This allows lots of programs to get along enough to
> work, but at the expense of being hard to track down when they become
> flakey. Anyway, with all the patches to ODBC recently this behaviour
is
> flipped flopped so, SQLSetConnectOption() now returns SQL_ERROR
instead of
> SQL_SUCCESS. It think I'm going to create a macro called STUB_RETURN
as
> discussed a few months ago be strict if we are debugging but lax if we
are
> trying to just get things working.
>
> Until then, (it's post 0.60 fodder anyway) here's a patch that should
make
> DBD::ODBC work again (make test passes 42.86% instead of 14.29% now
;-)
>
> I'll check it in when I'm at someplace with CVS access.
>
> --- odbc.orig Sat Jul 6 14:34:51 2002
> +++ odbc.c Tue Jul 9 14:01:27 2002
> @@ -1500,19 +1500,21 @@
> SQLUSMALLINT fOption,
> SQLPOINTER pvParam)
> {
> - SQLUINTEGER *piParam = (SQLUINTEGER *) pvParam;
> + SQLUINTEGER *piParam = (SQLUINTEGER *) pvParam;
>
> - CHECK_HDBC;
> - switch (fOption)
> - {
> -/* case :
> - break; */
> - default:
> - tdsdump_log(TDS_DBG_INFO1, "odbc:SQLGetConnectOption:
Statement
> option %d not implemented\n", fOption);
> - odbc_LogError ("Statement option not implemented");
> - return SQL_ERROR;
> - }
> - return SQL_SUCCESS;
> + CHECK_HDBC;
> +
> + switch (fOption) {
> + case SQL_AUTOCOMMIT:
> + *piParam = SQL_AUTOCOMMIT_ON;
> + return SQL_SUCCESS;
> + break;
> + default:
> + tdsdump_log(TDS_DBG_INFO1,
"odbc:SQLGetConnectOption:
> Statement option
> %d not implemented\n", fOption);
> + odbc_LogError ("Statement option not
implemented");
> + return SQL_ERROR;
> + }
> + return SQL_SUCCESS;
> }
>
> SQLRETURN SQL_API SQLGetData(
> @@ -1998,16 +2000,21 @@
> SQLUSMALLINT fOption,
> SQLUINTEGER vParam)
> {
> - CHECK_HDBC;
> + CHECK_HDBC;
>
> - switch (fOption)
> - {
> -/* case :
> - break;*/
> - default:
> - tdsdump_log(TDS_DBG_INFO1, "odbc:SQLSetConnectOption:
Statement
> option %d not implemented\n", fOption);
> - odbc_LogError ("Statement option not implemented");
> - return SQL_ERROR;
> + switch (fOption) {
> + case SQL_AUTOCOMMIT:
> + tdsdump_log(TDS_DBG_INFO1,
"odbc:SQLSetConnectOption:
> SQL_AUTOCOMMIT set to %d\n", vParam);
> + if (vParam != SQL_AUTOCOMMIT_ON) {
> + odbc_LogError ("Statement option
SQL_AUTOCOMMIT
> does not support
> OFF");
> + return SQL_ERROR;
> + }
> +
> + break;
> + default:
> + tdsdump_log(TDS_DBG_INFO1,
"odbc:SQLSetConnectOption:
> Statement
> option %d not implemented\n", fOption);
> + odbc_LogError ("Statement option not
implemented");
> + return SQL_ERROR;
> }
> return SQL_SUCCESS;
> }
>
>
>
> > Hi Brian, the relevant portion of /etc/odbc.ini is:
> >
> > [mssql]
> > Description =3D Default ODBC connection to mssql
> > Driver =3D /usr/local/freetds/lib/libtdsodbc.so
> > Servername =3D mssql
> > Database =3D testdb
> >
> > My versions are:
> > - unixODBC-2.0.7
> > - DBD-ODBC-0.30
> >
> > I tested `isql` (for the first time) and it does work! I can
connect
> > and I can issue a query and get a result back (although there are
some
> > issues there, too, but nevermind). Does that suggest a problem with
the
> > Perl DBI or DBD::ODBC? I probably don't have the very latest ones
of
> > those.
> >
> > Does anyone know if there are minimum version of unixODBC, DBD::ODBC
> > required for the latest version of FreeTDS to work?
> >
> > Thanks,
> > Eric
> >
> >
> > > -----Original Message-----
> > > From: Brian Bruns [mailto:camber AT ais.org]
> > > Sent: Monday, July 08, 2002 4:06 PM
> > > To: TDS Development Group
> > > Subject: [freetds] RE: pre2?
> > >=20
> > > Eric,
> > >=20
> > > can you send the relevent portions of your odbc.ini file and which
> > version
> > > of unixODBC you are running? Does this problem show up under isql
(or
> > is
> > > it odbctest...unixodbc, iodbc i forget)
> > >=20
> > > Brian
> > >=20
> > > On Mon, 8 Jul 2002, Eric Deutsch wrote:
> > >=20
> > > >
> > > > Hi, I've been running a few known-to-work examples I have lying
> > around
> > > > against the latest in CVS and have another problem. This one is
not
> > a
> > > > high priority and I have no suggested fix, but here's something
that
> > > > used to work but now does not:
> > > >
> > > > Using Linux x86 + Perl + DBI::ODBC (not DBD::Sybase) to MS SQL
> > Server
> > > > 2000 using TDS 7.0, I used to be able to do some simple queries
> > like:
> > > >
> > > > SELECT @@SERVERNAME AS 'Servername',@@VERSION AS 'Version'
> > > >
> > > > And get:
> > > >
> > > > MSSQL01 | Microsoft SQL Server 2000 - 8.00.534 (Intel X86)
> > > > Nov 19 2001 13:23:50
> > > > Copyright (c) 1988-2000 Microsoft Corporation
> > > > Standard Edition on Windows NT 5.0 (Build 2195: Service
Pack
> 2)
> > > >
> > > > This works fine using FreeTDS 0.53-cvs2002-04-06. But under the
> > latest
> > > > from CVS (I'll call it FreeTDS 0.53-cvs2002-07-08), I get
instead:
> > > >
> > > > Cannot connect to database
> > > > Error 08001 ([unixODBC][Driver Manager]Data source name not
found,
> > and
> > > > no default driver specified (SQL-IM002)
> > > > [unixODBC]Statement option not implemented (SQL-08001)(DBD:
> > > > dbd_db_login/SQLSetConnectOption err=3D-1))
> > > >
> > > > I tried another version of FreeTDS I had hanging around,
> > > > 0.53-cvs2002-06-19, and that gives the same problem. So,
sometime
> > > > between 2002-04-06 and 2002-06-19, I lost the ability to issue
even
> > the
> > > > simplest query via DBD::ODBC. The error message is inscrutable
to
> > me.
> > > > The two outputs where generated on the same machine with the
same
> > > > odbc.ini, after doing a `make install` in the appropriately
> > versioned
> > > > directory so all other variables besides the FreeTDS code should
> > > > probably be unrelated. In case it's useful, all three source
trees
> > were
> > > > built with:
> > > >
> > > > ./autogen.sh --with-tdsver=3D7.0 --with-unixodbc=3D/usr
> > > >
> > > > This is not a grave issue for me since I use DBD::Sybase mostly,
but
> > I'm
> > > > interested in seeing DBD::ODBC work, too.
> > > >
> > > > If I can do any additional tests, please let me know!
> > > >
> > > > Thanks,
> > > > Eric
> > > >
> > > >
> > > >
> > > > > From: Lowden, James K [mailto:LowdenJK AT bernstein.com]
> > > > > Sent: Monday, July 08, 2002 12:28 PM
> > > > >
> > > > > Brian,
> > > > >
> > > > > I think we're about done adding patches for 0.60, and except
for
> > the
> > > > TEXT
> > > > > truncation under 7.0, I think we're feature-complete. I'm
> > planning on
> > > > > scribbling in the UG this week; should be ready by the
weekend.
> > How
> > > > do
> > > > > things look to you?
> > > > >
> > > > > --jkl
> > > > >
> > > > > ---
> > > > > You are currently subscribed to freetds as:
> > > > [edeutsch AT systemsbiology.org]
> > > > > To unsubscribe, forward this message to leave-freetds-
> > > > > 127899P AT franklin.oit.unc.edu
> > > >
> > > > ---
> > > > You are currently subscribed to freetds as: [camber AT ais.org]
> > > > To unsubscribe, forward this message to leave-freetds-
> > > 127899P AT franklin.oit.unc.edu
> > > >
> > > >
> > >=20
> > >=20
> > > ---
> > > You are currently subscribed to freetds as:
> > [edeutsch AT systemsbiology.org]
> > > To unsubscribe, forward this message to leave-freetds-
> > > 127899P AT franklin.oit.unc.edu
>
> ---
> You are currently subscribed to freetds as:
[edeutsch AT systemsbiology.org]
> To unsubscribe, forward this message to leave-freetds-
> 127899P AT franklin.oit.unc.edu
-
RE: pre2?
, (continued)
- RE: pre2?, Eric Deutsch, 07/08/2002
- RE: pre2?, Eric Deutsch, 07/08/2002
- RE: pre2?, Brian Bruns, 07/08/2002
- RE: pre2?, Eric Deutsch, 07/08/2002
- RE: pre2?, Brian Bruns, 07/08/2002
- Re: pre2?, Brian Bruns, 07/08/2002
- Re: pre2?, Brian Bruns, 07/08/2002
- Re: pre2?, James K . Lowden, 07/08/2002
- Re: pre2?, ZIGLIO Frediano, 07/09/2002
- RE: pre2?, Brian Bruns, 07/09/2002
- RE: pre2?, Eric Deutsch, 07/09/2002
- RE: pre2?, Lowden, James K, 07/09/2002
- RE: pre2?, Bill Thompson, 07/09/2002
Archive powered by MHonArc 2.6.24.