[Sqlrelay-discussion] Reading out blobs
Brought to you by:
mused
|
From: Ingmar B. <sw...@gm...> - 2007-08-15 15:46:13
|
Dear fellow mailinglist members,
I am having trouble reading out a blob with sql-relay. I use sql-relay
version 0.39.2
and oracle 10g .
The code I used comes directly from the sqlrelay manual:
$query = "-- debug\n BEGIN select large_value into :large_value
from wf_attribute_instances i
where i.atri_id = 6011
and i.prin_id = 2090477 ; END;";
$cur = sqlrcur_alloc($conn);
sqlrcur_prepareQuery($cur,$query);
sqlrcur_defineOutputBindBlob($cur,"large_value");
sqlrcur_executeQuery($cur);
$large_value=sqlrcur_getOutputBindBlob($cur,"large_value");
$length=sqlrcur_getOutputBindLength($cur,"large_value");
sqlrcon_endSession($conn);
echo "<br>waarde blob=".$large_value;
echo "<br>lengte blob=".$length;
sqlrcur_free($cur);
The result ($large_value) was empty. So we turned on debugging:
sqlr-connection-oracle8-debug, to locate
the problem. And now, with debugging, suddenly the result is not empty
anymore. Below you will find
the query debug (-- debug\n) information with and without debugging. Has
anyone encountered this problem ?
I would greatly appreciate any suggestions/ advice :-)
output without debugging:
Sending Query:
-- debug
BEGIN select large_value into :large_value
from wf_attribute_instances i
where i.atri_id = 6011
and i.prin_id = 2090477 ; END;
Length: %ld
Requesting a new cursor.
Sending %ld Input Bind Variables:
Sending Output Bind Variables:
large_value(%ld)
Send Column Info: yes
Skipping and Fetching
Skipping %ld rows
Fetching %ld rows
Checking For An Error... none.
Getting Cursor ID...
Cursor ID: %ld
Previous result set was not suspended.
Parsing Column Info
Actual row count: unknown
Affected row count: %ld
Column count: %ld
Receiving Output Bind Values:
getting type...
done getting type: %ld
NULL output bind
done fetching.
large_value=
getting type...
done getting type: %ld
Parsing Data
Got end of result set.
Ending Session
Deallocated cursor
Result Set Buffer Size: %ld
Connecting to listener...
Unix socket: /tmp/MYDATABASE.sqlr_socket
Authenticating with listener : MYDATABASE:MYDATABASE
Waiting for auth success/failure...
No authentication error.
Must Reconnect.
Reconnecting to
unix port: /usr/local/firstworks/var/sqlrelay/tmp/sockets/4662
Connected.
Authenticating with connection : MYDATABASE:MYDATABASE
Waiting for auth success/failure...
No authentication error.
Sending Query:
BEGIN dbms_output.get_line( line => :line, status => :status ); END;
Length: %ld
Requesting a new cursor.
Sending %ld Input Bind Variables:
Sending Output Bind Variables:
line(%ld)
status(%ld)
Send Column Info: yes
Skipping and Fetching
row to get: %ld
Skipping %ld rows
Fetching %ld rows
Checking For An Error... none.
Getting Cursor ID...
Cursor ID: %ld
Previous result set was not suspended.
Parsing Column Info
Actual row count: unknown
Affected row count: %ld
Column count: %ld
Receiving Output Bind Values:
getting type...
done getting type: %ld
NULL output bind
done fetching.
line=
getting type...
done getting type: %ld
STRING output bind
length=%ld
done fetching
status=1
getting type...
done getting type: %ld
Parsing Data
Got end of result set.
Creating Column Arrays...
Aborting Result Set For Cursor: %ld
Deallocated cursor
Ending Session
Deallocated connection
---------------------------------------------------------------------------------------------
With debugging
Sending Query:
-- debug
BEGIN select large_value into :large_value
from wf_attribute_instances i
where i.atri_id = 6011
and i.prin_id = 2090477 ; END;
Length: %ld
Requesting a new cursor.
Sending %ld Input Bind Variables:
Sending Output Bind Variables:
large_value(%ld)
Send Column Info: yes
Skipping and Fetching
Skipping %ld rows
Fetching %ld rows
Checking For An Error... none.
Getting Cursor ID...
Cursor ID: %ld
Previous result set was not suspended.
Parsing Column Info
Actual row count: unknown
Affected row count: %ld
Column count: %ld
Receiving Output Bind Values:
getting type...
done getting type: %ld
LOB/CLOB output bind
length=%ld
fetching...
fetching...
fetching...
done fetching.
large_value=
a:16:{s:5:"dummy";s:0:"";s:3:"sel";s:416:"238c3e4a29aaa449c9e2fd8e27c6e84a3ab18f
7198951473df85ae9448e109c0e1aba818742d9cb084a2d2ca273178b5e9272f381cfb8a2d4e6e37
a29a96fcb5a1e3601dedf4b46d44f003b2a384d5795e4e3ea500bad7c767e1f3d54c4c69b1dfce00
dcc6d189fd7edcd8cf63f50a0fb85a0ea98b39360fd2c4da1ee505f59a1611d65e7c9212a5fb3f5e
e295765cf7b7414a32ba5268227bee09a6211b534a99221db576ffba91e21ce248c428ba226f9a8e
e9a412c77eb122804511b189ba7b4259132ea2b8e0d09a0577c5435297";s:6:"act_cd";s:9:"17
0777000";s:12:"act_class_cd";s:9:"ORGANIZER";s:13:"vraagstelling";s:12:".eoeuoeu
oaeu";s:5:"datum";s:10:"06-07-2007";s:11:"streefdagen";s:2:"30";s:7:"ind_via";s:
1:"I";s:4:"orga";s:28:"HUISARTSENPRAKTIJK Het
Viooltje";s:7:"orga_id";s:4:"6251";s:
10:"ind_inform";s:1:"J";s:13:"ind_inform_me";s:1:"J";s:14:"inform_asen_id";s:0:"
";s:14:"inform_pati_id";s:0:"";s:23:"ind_vervolg_actie_enter";s:1:"0";s:6:"Submi
t";s:5:"Enter";}
getting type...
done getting type: %ld
Parsing Data
Got end of result set.
Ending Session
Deallocated cursor
Result Set Buffer Size: %ld
Connecting to listener...
Unix socket: /tmp/MYDATABASE.sqlr_socket
Authenticating with listener : MYDATABASE:MYDATABASE
Waiting for auth success/failure...
No authentication error.
Must Reconnect.
Reconnecting to
unix port: /usr/local/firstworks/var/sqlrelay/tmp/sockets/2153
Connected.
Authenticating with connection : MYDATABASE:MYDATABASE
Waiting for auth success/failure...
No authentication error.
Sending Query:
BEGIN dbms_output.get_line( line => :line, status => :status ); END;
Length: %ld
Requesting a new cursor.
Sending %ld Input Bind Variables:
Sending Output Bind Variables:
line(%ld)
status(%ld)
Send Column Info: yes
Skipping and Fetching
row to get: %ld
Skipping %ld rows
Fetching %ld rows
Checking For An Error... none.
Getting Cursor ID...
Cursor ID: %ld
Previous result set was not suspended.
Parsing Column Info
Actual row count: unknown
Affected row count: %ld
Column count: %ld
Receiving Output Bind Values:
getting type...
done getting type: %ld
NULL output bind
done fetching.
line=
getting type...
done getting type: %ld
STRING output bind
length=%ld
done fetching
status=1
getting type...
done getting type: %ld
Parsing Data
Got end of result set.
Creating Column Arrays...
Aborting Result Set For Cursor: %ld
Deallocated cursor
Ending Session
Deallocated connection
Thnx in advance,
Ingmar
|