Skip to Content.
Sympa Menu

freetds - RE: UNIMPLEMENTED dbsetopt(option = 14)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: UNIMPLEMENTED dbsetopt(option = 14)
  • Date: Tue, 12 Nov 2002 17:09:27 -0500


> From: Chris [mailto:ccortner AT cvol.net]
> Sent: November 12, 2002 4:42 PM
>
> Im getting an error in my freetds dump file when I try to
> connect to a MS
> SQL 7 server through a php script. I tried both with the cli
> and module
> versions of php.
>
> UNIMPLEMENTED dbsetopt(option = 14)

This looks to me like a bug. I found two problems:

1. Setting the buffer to a negative value should, according to Books
Online, set the buffer to the default value: 100.

2. We were returning FAIL for this dbsetopt value, for no good reason that
I could find.

If you're running a recent snapshot, just apply the attached patch. It's
committed and will appear in tonight's snapshot.

--jkl

Index: src/dblib/dblib.c
===================================================================
RCS file: /cvsroot/freetds/freetds/src/dblib/dblib.c,v
retrieving revision 1.102
diff -u -r1.102 dblib.c
--- src/dblib/dblib.c 10 Nov 2002 18:06:05 -0000 1.102
+++ src/dblib/dblib.c 12 Nov 2002 22:03:53 -0000
@@ -328,9 +328,10 @@

if (buf_size < 0)
{
- /* XXX is it okay to ignore this? */
+ buf_size = 100; /* the default according to Microsoft */
}
- else if (buf_size == 0)
+
+ if (buf_size == 0)
{
buf->buffering_on = 0;
buf->elcount = 1;
@@ -2829,6 +2830,7 @@
/* requires param "0" to "2147483647" */
/* XXX should be more robust than just a atoi() */
buffer_set_buffering(&(dbproc->row_buf), atoi(char_param));
+ return SUCCEED;
break;
case DBPRCOLSEP:
case DBPRLINELEN:


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page