in reply to Extracting long raw data from Oracle
Or you can use $db->quote($blob_a_value) to force the proper conversion. DBI should "decode" any of the inserted data back into its original format for you when you use any of the fetch() or select()-type functions. Calls such as the $db->do() above do automatic quotation of your data for '?' identified parameters. Experiment with $db->quote() to see how it behaves, as it escapes any potentially dangerous characters such as '\n', or " ' ".# $blob_a_data is a GIF, or other binary data $db->do("INSERT INTO blob_table (blob_a) VALUES (?)", {}, $blob_a_data); # Later on... my ($blob_a_fromdb) = $db->selectrow_array("SELECT blob_a FROM blob_table"); # $blob_a_fromdb and $blob_a_data should be the same.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Extracting long raw data from Oracle
by rrwo (Friar) on Feb 13, 2001 at 06:52 UTC | |
by BigJoe (Curate) on Feb 13, 2001 at 18:28 UTC |