Whats the best way to get the content of an out or inout blob parameter of a procedure in embedded sql? I wanted to use "EXEC SQL EXECUTE", but the problem is that i don't know the (maximum) size of the blob parameters. I can't use GET DATA, cause it only works with cursors. Setting the sqltype to DT_VARIABLE (and creating a corresponding connection variable) didn't work, cause you can only use them to send Blobs to the db, according to the documentation. The only way i came up with (aside from using a select and a cursor), is to preallocate some memory and hope it's enough.
|
|
|||||
|
|
|
You might be able to guarantee that "it's enough" by using SUBSTR ( column, 1, n ) in your SELECT. Other possibilities might be to push some logic onto the server; e.g., send a SELECT whatever INTO connection-variable, then grab chunks of the connection-variable... or write a procedure or function. And now... it's time for someone who has a clue about embedded sql to take a shot :) |
||
|
|
|
|
I think i have found a possible way.
Not nice but should do it. Does anyone have a better idea? |
||
|
|