Writing image columns into Sybase using the built-in
John Flynn (10/29/08 11:06AM)
John Flynn (10/29/08 11:06 AM)
4Dv2004ODBC commands
Hi.
About a year ago I posted this question:
I've been playing with the ODBC client commands (aka External Data
Source commands) that are built into 4D 2004. I am communicating with
Sybase Adaptive Server Enterprise, both v11 and v15.
So far I have been able to figure out how to read all different
datatypes from Sybase into 4D. This includes "image" (aka blob)
columns in Sybase that I want to read into 4D picture variables.
Also, I have figured out how to write all different datatypes, with
the exception of the image columns. In other words, I know how to
construct an INSERT or UPDATE statement and send rows into Sybase,
unless one of the values I want to send is a large 4D picture
variable to send into a Sybase image column. My question is, does
anyone know how to do that?
I know how to do it if the picture is relatively small (like under
16K). In that case I can convert the 4D picture to a hex
representation and include it directly in an INSERT, UPDATE, or
WRITETEXT command. 16K is roughly the largest picture I can convert
to hex and still fit in a 4D text variable. But I don't know how to
do it if the picture is a big'un.
I received an advice to use the ODBC SET PARAMETER syntax. I have
finally
gotten around to trying that, but I can't get it to work. I can send
large
text fields that way, but when I try to send a picture field I get an
ODBC
error "Invalid precision value. Error in parameter 1." I've also tried
the
<<<variablename>>> syntax, with the same result.
So, I am still stuck trying to write picture/image data into Sybase
using
the External Data Source commands. Does anyone know how to do this?
Thanks.
- John.
Reply to this message
Summary created 10/29/08 at 1:19PM by Intellex Corporation
Comments welcome at: feedback@intellexcorp.com