I have a SQL database that contains an audio file as an image.  I am attempting to pull it out and create an ASF file.  The script does pull it out - but the file is un-playable.  Anyone have any ideas?  Code snippet below.
 
TIA
 
$dbh1->{LongReadLen} = 1024 * 1024;
my $sql0 = "select convert(binary(4000),recording)
     from databasetablename
     where convert(varchar(8),reportdate,112) = '20060414'
     and recording is not null
     and intcode = '19077'";
my $sth0 = $dbh1->prepare($sql0);
$sth0->execute || die "Can't perform select\n";
my $var = $sth0->fetchrow;

my $file = "rec.asf";
open(FILE1,">$file") || die "Can't open $file\n";
print FILE1 "$var";
close FILE1;
$sth0->finish;
 
 
Ken Barker
IT Lead
Tel: 314-213-7927
1100 Corporate Square
St. Louis, MO 63132
[EMAIL PROTECTED]
The information in this e-mail is confidential and intended solely for the person to whom it is addressed. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail and then delete the message from your computer. Americall Group, Inc. cannot be held responsible or liable in any way whatsoever for and/or in connection with any consequences and/or damage resulting from the dispatch and receipt of this e-mail and the content of this e-mail. Americall Group, Inc. takes no responsibility for any computer virus that might be transferred by way of this email.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to