Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: DBI and Blobs

by rupesh (Hermit)
on Nov 29, 2004 at 04:05 UTC ( #410855=note: print w/ replies, xml ) Need Help??


in reply to DBI and Blobs


I have a couple of questions:

1. Have you tried inserting the value corressponding to "num" without the single quotes - ' ?
2. Does the query  select * from table work? If so, then what is the result set?
3. What are the troubles that you are facing? Please be more specific.

Cheers,
Rupesh.


Comment on Re: DBI and Blobs
Download Code
Re^2: DBI and Blobs
by Anonymous Monk on Nov 29, 2004 at 04:34 UTC
    That select statement does not seem to work

      Could you elaborate please? Does prepare returns undef? Does execute returns undef? Does fetch returns undef? Does fetch return the wrong number of columns? Does your computer go up in flames? What's in $DBI::errstr?

      Update: The DBI docs have a little to say on the subject:

      Handling BLOB / LONG / Memo Fields

      Many databases support ``blob'' (binary large objects), ``long'', or similar datatypes for holding very long strings or large amounts of binary data in a single field. Some databases support variable length long values over 2,000,000,000 bytes in length.

      Since values of that size can't usually be held in memory, and because databases can't usually know in advance the length of the longest long that will be returned from a SELECT statement (unlike other data types), some special handling is required.

      In this situation, the value of the $h->{LongReadLen} attribute is used to determine how much buffer space to allocate when fetching such fields. The $h->{LongTruncOk} attribute is used to determine how to behave if a fetched value can't fit into the buffer.

      When trying to insert long or binary values, placeholders should be used since there are often limits on the maximum size of an INSERT statement and the quote method generally can't cope with binary data. See Placeholders and Bind Values.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2014-09-18 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (121 votes), past polls