calling sp_password store procedure failed
bkline at rksystems.com
Fri Jul 27 19:04:46 EDT 2001
On Fri, 27 Jul 2001, Michael Peppler wrote:
> Bob Kline writes:
> > On Fri, 27 Jul 2001, Michael Peppler wrote:
> > > The protocol doesn't handle this natively (at least I don't think
> > > so), so the driver would have to handle this itself.
> > If by protocol you mean TDS, yes.
> Do you mean that TDS supports placeholders for stored proc calls?
> If so does it query the server to check for datatypes, quoting, etc?
> (the Sybase C API doesn't handle this)
I'm not the most knowledgable on the TDS protocol, so I'm fairly
confident someone will step in and correct anything I mangle, but off
the top of my head the answer to your first question is yes, TDS does
support placeholders for stored procedure calls. As far as I know it
doesn't check with the server to find out about parameter datatypes, but
just plugs in the data types provided by the programmer (in the JDBC
world, if I say setInt(), the driver will push an integer parameter onto
the stream, and so forth). I'm not sure how quoting would come into
play in this context. As far as I know, the low-level software talking
to the server via TDS (in this case, the JDBC driver) says "here comes
the next parameter; it's an integer and it takes up 4 bytes [it says
this by pushing type codes and lengths onto the stream] and now here's
the data [more bytes pushed onto the stream] and here's the next; it's a
NULLABLE VARCHAR and this value has 14 bytes [a few more bytes for the
type code and length] and here are the characters ...." That's a pretty
loose description, but I think you get the idea. It's been a while
since I debugged what was going across the wire, but I think this is
what I remember about the general mechanism. Since the type and number
of characters have been specified explicitly in front of the data,
there's no need for quotes (or any other delimiters) to mark off
strings. Or have I completely misunderstood what you were asking?
mailto:bkline at rksystems.com
More information about the FreeTDS