[freetds] TDS_DONE_TOKEN (and others)

Lowden, James K LowdenJK at bernstein.com
Thu May 1 10:08:20 EDT 2003


> From: Frediano Ziglio [mailto:freddyz77 at tin.it]
> Sent: May 1, 2003 3:30 AM
> 
> you can use syntax like enum my_enum var:16;

Hmm, I've never seen that before.  I can't find any description of it in
K&R.  

> > With TDS_DYNAMIC, you send the statement text, then *ask* 
> the server to
> > describe the i/o parameters (i.e. types).   To execute, you 
> send TDS_DYNAMIC
> > again ('type' TDS_DYN_EXEC (0x02)), followed by a bunch of parameter
> > packets.  Paramater names are not supported.  
> 
> I know, but there are problem with image/text field...

That's a limitation of stored procedures, too.  I think dynamic SQL
basically creates a stored procedure on the server.  From Sybase's T-SQL
UG[1]:

<quote>
Parameters must be given a system datatype (except text or image) or a
user-defined datatype, and (if required for the datatype) a length or
precision and scale in parentheses.
</quote>

The other thing you tried was to send TDS_PARAMFMT packets to the server,
trying to describe the parameter.  It doesn't work that way.  The server
sends them to you in response to TDS_DYN_PREPARE.  I assume you knew that,
and were just trying *anything* to see if you could create image-type
paramaters.  

Regards, 

--jkl

[1]
http://sybooks.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__Book
View and 
http://sybooks.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__Book
TextView/42965;pt=42726


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.




More information about the FreeTDS mailing list