Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. LindaLiner

    How to handle binary data in Perl?

    I run the same query from SQL Database Management Studio, and I can get the binary data out as 0x524946469C3F0300....... So I think the query and data are good. It must be this conversion error.
  2. LindaLiner

    How to handle binary data in Perl?

    The first fecth will give me multi-line outputs of TESTING. When I use length($field), got 0s all over of screen. But the second one (fetchrow_array)I got error message of error_handler: Data-conversion resulted in overflow. and nothing was displayed besides that. ALso, when I use your...
  3. LindaLiner

    How to handle binary data in Perl?

    There is no duplication in database. Since I got 1 as output from the database when I run below code. CODE $query = "select count(*) from English_English where Audio_Name = 'ENG_2.WAV'"; $sth = $dbh->prepare($query) or die "prepare failed\n"; $sth->execute() or die "unable to execute query...
  4. LindaLiner

    How to handle binary data in Perl?

    Thank you, BrianAtWork. I did output something from the loop. And I notice if I use while(my ($field) = $sth->fetch) { print "TESTING\n"; print OUTF $field; } I can see forever loop of printing TESTING. But when I use while(my ($field) = $sth->fetchrow_array) { print "TESTING\n"...
  5. LindaLiner

    How to handle binary data in Perl?

    I am using "print OUTF $field". Still can't get audio file saved. Thank you for pointing that out.
  6. LindaLiner

    How to handle binary data in Perl?

    Thank you, Kirsle. 1. Yes, I do get an empty wav file. 2. I am not sure what happened in the database. But I know it was a good valid wav audio file before it got into database. 3. When I output the count(*) from the same query, it is ONE. So I believe it only got one wav file back. Thank you...
  7. LindaLiner

    How to handle binary data in Perl?

    Hi, there, I am using Perl:DBI to talk with SQL server. I want to get the varbinary data from database and saved as .wav file. I couldn't find useful information about handling binary data in Perl. And my code doesn't work. Can somebody help me out? Thank in advance! Below is my code...

Part and Inventory Search

Back
Top