Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
The stupid question is the question not asked
 
PerlMonks  

Re: Retrieve MS SQL Image to per/UNIX

by cbro (Pilgrim)
on Jun 06, 2003 at 12:58 UTC ( #263649=note: print w/ replies, xml ) Need Help??


in reply to Retrieve MS SQL Image to per/UNIX

From the DBD::Sybase docs:
"ct_get_data() takes 3 parameters: The column number (starting at 1) of the query, a scalar ref and a byte count. If the byte count is 0 then we read as many bytes as possible".

(e.g $sth->func($column, \$data, 1024, 'ct_get_data');)
You did not pass a scalar ref, but instead just a scalar. Otherwise, you followed the docs to the tee. Try correcting that reference, and see if that makes a difference.
HTH,
Chris


Comment on Re: Retrieve MS SQL Image to per/UNIX
Download Code
Re: Re: Retrieve MS SQL Image to per/UNIX
by mcooperman (Initiate) on Jun 06, 2003 at 17:51 UTC
    Chris,
    Thanks. I missed the '\'.
    Now, unfortunately, it's throwing me 'out of memory' errors, despite my set textsize 2048 and setting the default in freetds.conf
      cooperman,
      Try:
      $dbh->do("set textsize <somesize>");
      From this site:
      Sybase defaults the TEXTSIZE attribute (aka LongReadLen) to 32k, but MS-SQL 7 doesn't seem to do that correctly, resulting in very large memory requests when querying tables with TEXT/IMAGE data columns. The work-around is to set TEXTSIZE to some decent value via $dbh->{LongReadLen} (if that works - I haven't had any confirmation that it does) or via $dbh->do(``set textsize <somesize>'');
        cbro,
        I have already tried set textsize both from a ->do(...); statement and in the freetds.conf file. No dice. I am currently fiddling with the freetds nightly development build. I am hoping maybe something was advanced in 0.62 work. -Marc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://263649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-04-21 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls