freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Andrew Shuttlewood <andrew.shuttlewood AT futureroute.co.uk>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] ODBC limitations?
- Date: 27 Feb 2003 17:28:17 +0000
On Thu, 2003-02-27 at 15:11, ZIGLIO Frediano wrote:
<SNIP>
> > Record number 3, error code = 00000 and error string = Msg 170, Level
> > 15, State 1, Server SQL, Line 1
> > Line 1: Incorrect syntax near '?'.
> >
> > I get the same problems for both approaches (both with and without the
> > []s)
> >
>
> I added a test for this problem in HEAD. I replaced in BRANCH0_61 (just
> copied over print.c, rebuild and execute print)
Okay, I tried this, and it works.
First one observation - I was using exec direct. The failure is
different with Prepare. Is this a case of a driver being too considerate
too us (and that we really should have used prepare and we're very very
naughty people?)
Anyway, I switched to using prepare, and I now get an error about using
a binary.
The code we use is:
unsigned char magicfun[1024];
SQLBindParameter(hStmt, //StatementHandle
2, //ParameterNumber
SQL_PARAM_INPUT, //InputOutputType
SQL_C_BINARY, //ValueType Input
SQL_BINARY, //ParameterType Actual
Table Type
1000, //ColumnSize
0, //DecimalDigits
magicfun, //ParameterValuePtr
len, //BufferLength
&len);
Now, going just from what is in the debug log, this isn't being sent.
It's an improvement over not using prepare, as it places a 0 instead of
a question mark, but is there a calling error here?
Relevant bits from hte debuglog.
Sending packet @ 2003-02-27 17:26:21.675048
0000 01 01 00 36 00 00 01 00 5b 00 73 00 70 00 5f 00 |...6....
[.s.p._.|
0010 69 00 6e 00 73 00 65 00 72 00 74 00 43 00 68 00 |i.n.s.e.
r.t.C.h.|
0020 61 00 72 00 61 00 63 00 74 00 65 00 72 00 5d 00 |a.r.a.c.
t.e.r.].|
0030 28 00 30 00 29 00 |(.0.).|
Received header @ 2003-02-27 17:26:21.675765
0000 04 01 00 6a 00 35 01 00 |...j.5..|
Received packet @ 2003-02-27 17:26:21.675812
0000 aa 56 00 aa 00 00 00 01 0f 22 00 4c 00 69 00 6e |.V......
.".L.i.n|
0010 00 65 00 20 00 31 00 3a 00 20 00 49 00 6e 00 63 |.e. .1.: .
.I.n.c|
0020 00 6f 00 72 00 72 00 65 00 63 00 74 00 20 00 73 |.o.r.r.e .c.t.
.s|
0030 00 79 00 6e 00 74 00 61 00 78 00 20 00 6e 00 65 |.y.n.t.a .x.
.n.e|
0040 00 61 00 72 00 20 00 27 00 30 00 27 00 2e 00 03 |.a.r. .'
.0.'....|
0050 53 00 51 00 4c 00 00 01 00 fd 02 00 fd 00 01 00 |S.Q.L...
........|
0060 00 00 |..|
2003-02-27 17:26:21.675899 processing result tokens. marker is
aa(ERROR)
2003-02-27 17:26:21.675920 inside tds_process_default_tokens() marker is
aa(ERROR)
2003-02-27 17:26:21.675961 processing result tokens. marker is
fd(DONE)
2003-02-27 17:26:21.675984 inside tds_process_end() more_results = 0,
was_cancelled = 0
SQLFreeHandle(3, 0xa07add0)
-
[freetds] ODBC limitations?,
Andrew Shuttlewood, 02/25/2003
- <Possible follow-up(s)>
-
RE: [freetds] ODBC limitations?,
ZIGLIO Frediano, 02/25/2003
-
RE: [freetds] ODBC limitations?,
Andrew Shuttlewood, 02/25/2003
-
RE: [freetds] ODBC limitations?,
Andrew Shuttlewood, 02/25/2003
- RE: [freetds] ODBC limitations?, Andrew Shuttlewood, 02/25/2003
-
RE: [freetds] ODBC limitations?,
Andrew Shuttlewood, 02/25/2003
-
RE: [freetds] ODBC limitations?,
Andrew Shuttlewood, 02/25/2003
-
RE: [freetds] ODBC limitations?,
ZIGLIO Frediano, 02/27/2003
- RE: [freetds] ODBC limitations?, Andrew Shuttlewood, 02/27/2003
Archive powered by MHonArc 2.6.24.