I'm trying to grab some binary data out of a column in my SQL Server
2000 database.  The fields are often smaller than my normal 30k
LongReadLen limit for my application, but a few of the records have
significantly more data in that column that 30k.  I have no problems
inserting the value, I bind it as a SQL_LONGVARBINARY and also record
the length in bytes in another column in the same row.  So, what I was
doing was reading in the length column, and checking to see if was
greater than my current LongReadLen.  If it is, I changed the
LongReadLen for the connection and then prepared a new statement handle
for getting the large data column.

However, the statement handle doesn't inherit the new LongReadLen, it
actually retains the old value of 30kb that I set when I make the
connection - so I get a right truncation error on execution.

What I'm looking for is a way to fix this so I can adjust the
LongReadLen, or a better way to read long fields from a SQL Server 2000
database.  I'm using perl 5.6.1, DBI 1.21, and DBD::ODBC 0.37.

Please copy replies to [EMAIL PROTECTED], as I'm not a subscriber to
this list. 

Thanks.

-Tom

Reply via email to