Memory Allocation Error when to fetching BLOB field from MS-SQL server Table
From: Bazil (Admin_at_goMonitor.com)
Date: 11/30/03
- Next message: Mike Flannigan: "Re: Newsgroup Searching Program"
- Previous message: Mike Flannigan: "Re: Newsgroup Searching Program"
- Next in thread: William Herrera: "Re: Memory Allocation Error when to fetching BLOB field from MS-SQL server Table"
- Reply: William Herrera: "Re: Memory Allocation Error when to fetching BLOB field from MS-SQL server Table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Nov 2003 20:33:04 -0500
If anyone has experience in fetching a Blob field on MS-SQL(7) please have a
look at this.
I am trying to fetch a Blob column (Image) from a MS-SQL(7) table.
The select terminates with and error:
"Could not allocate enough memory (-1 bytes) for column 1."
it dies on line 14.
Thanks for any suggestion.
Bazil
Here is the Code:
1 use Win32::ODBC;
2 if (!($dbh = new Win32::ODBC("DSN=CameraSQL;UID=***;PWD=***" )))
3 {
4 $Err ='ODBC';
5 $ErrMsg='ODBC:'. "new(): " . Win32::ODBC::Error();
6 print $ErrMsg <BR>;
7 die;
8 }
9 $SqlString = " Select viewcontent from NewProfile where ID='Prof2' ";
10 if(($dbh->Sql( $SqlString )))
11 {
12 $ErrMsg = 'SQL-Err:'.$dbh->Error();
13 print "SQL ERR on: $SqlString $ErrMs
14 die
15 };
16 $dbh->FetchRow();
17 {
18 undef %Data;
19 %Data = $dbh->DataHash();
10 $FldContent=$Data{$_[1]};
- Next message: Mike Flannigan: "Re: Newsgroup Searching Program"
- Previous message: Mike Flannigan: "Re: Newsgroup Searching Program"
- Next in thread: William Herrera: "Re: Memory Allocation Error when to fetching BLOB field from MS-SQL server Table"
- Reply: William Herrera: "Re: Memory Allocation Error when to fetching BLOB field from MS-SQL server Table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]