Blob from Parameter in Stored Procedure


I am trying to get an image from a blob returned in a parameter in a stored proc using an TIBStoredProc

CreateBlobStream does not work as it requires a field type in the parameter and won't accept a Param

What is the work around to this please.


6/20/2015 8:33:05 AM
embarcadero.delphi.interbase 331 articles. 1 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 48

Alan Scott wrote:
> Hi
> I am trying to get an image from a blob returned in a parameter in a stored proc using an TIBStoredProc
> CreateBlobStream does not work as it requires a field type in the parameter and won't accept a Param
> What is the work around to this please.
> Thanks
> Alan

TParam has an AsStream property.  That will return the data in a stream.

   bs : TStream;
   bs := sp1.ParamByName('proj_desc').AsStream;

Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
6/20/2015 8:33:14 PM

Similar Artilces:

Blob as parameter in stored procedure
Can I use a blob as a parameter in a stored procedure in Interbase (see cut-down procedure below)? The description field is a blob sub_type 1 segment size 80. I have searched the forums and have read that it shouldn't work and it will work, but haven't seen any recent posts on this topic. Can this safely be used without damaging the database? If not, could I just define the description parameter as varchar(500)? Thanks, Stan Walker CREATE PROCEDURE PPT_ADDNEWREC ( P_ITEMID INTEGER, P_PARTNUMBER VARCHAR (20) CHARACTER SET NONE, P_PITTYPE CHAR (1) CHARA...

Oracle stored procedure with BLOB parameter
I have two simple Oracle7 stored procedures that will store LONG RAW data into and retrieve from an Oracle table. They are declared as transaction object's local external function - something like put_raw( long id, BLOB b, REF int returncode) and get_raw(long id, REF BLOB b, REF int returncode) The problem I am having is that put_raw() works just fine. Get_raw() seems to work, and to verify , I write the BLOB variable into a file. It is supposed to be a JPG file, but the written file is not a JPG. Secondly, before invoking get_raw(), I must do: b = BLOB(space(32000)) ...

Passing Blob parameter to Oracle's stored procedure
What is PB data type equivalent to Oracle's LONG RAW? Using PB5, I am invoking a Oracle's stored procedure one of whose parameter is of type LONG RAW. I tried passing it as PB's string and blob type, and neither works; it generates ORA-06502. I cannot use UPDATEBLOB, and must use the stored procedure because of security requirement on the database. Thank you. Hi You have to declare a RPC function for that stored procedure. The RPC declaration is part of the transaction object as an external function declaration. So, create a transaction userobect, declare the ...

Calling a stored procedure inside another stored procedure (or "nested stored procedures")
Hi all - I'm trying to optimized my stored procedures to be a bit easier to maintain, and am sure this is possible, not am very unclear on the syntax to doing this correctly.  For example, I have a simple stored procedure that takes a string as a parameter, and returns its resolved index that corresponds to a record in my database. ie exec dbo.DeriveStatusID 'Created' returns an int value as 1 (performed by "SELECT statusID FROM statusList WHERE statusName= 'Created')  but I also have a second stored procedure that needs to make reference to&n...

Calling a Stored Procedure from a Stored Procedure
Can you do this? I have a sp that returns a list of eligible accounts and then I use that list in other sp but I don't want to keep copying the code, I would like to be able to use it as a sub query in other sp but I don't know if this is possible or what the syntax would be. Thanks, Aaron You cannot do that directly. You can: 1. Use User defined functions which can return a resultset 2. Use a local #temp table which can hold the resultset of the called stored procedure and use this #temp table in your subsequent processing INSERT #tempTable EXEC s...

calling a stored procedure from a stored procedure
Hi Group! I'm on ASA 8.02 Build 4411 writing sprocs in WATCOM SQL. I have a sproc which breaks a given string-parameter into pieces. It's result set contains the pieces, e.g. last line of sproc: "select item from mytable;". This sproc works fine. Now I need to call this procedure from another procedure which has a variable result set. I tried the following: <snip... set ll_retval = 0; call sp_breakstring(as_bzp,','); BreakLoop: while ll_retval <> 100 and not ll_retval < 0 loop set li_zaehler = li_zaehler + 1; fetch next sp_breakstrin...

Execute stored procedure from stored procedure
Hello,i need to execute a stored procedure from another stored procedure. For example:StoredProcedure1: Returns a table with columns "year" and "value".StoredProcedure2: Also returns a table with columns "year" and "value".In Stored Procedure3: I would like to use the results from StoredProcedure1 and StoredProcedure2 and join them. Can somebody give me an example how to execute a stored procedure from another one and use the result table for a new command?Kind regards and thanks,carsaw hi,first off all let me clarify here - you cannot return ta...

Calling a stored procedure with output parameter and parameter name binding does not work
Hello NG, Named parameters are a fine feature, you don't have to obey the parameter order and can omit parameters that have default values. BUT if you try to use output parameters in the escaped syntax for jdbc like the following: { ? = call myProc ( @MyOutParam = ? ) } it doesn't seem to work anymore. Or am I simply too stupid? Maybe I have missed some documentation detail? Maybe someone can point me to the right direction? I'm really desperate. For implementation details see code snippet below. Thanks in advance. With best regards, have a merry christmas and a ha...

Using stored procedure with parameters gives 'parameter not supplied'
Hi all,I'm using an SqlDataSource to execute a stored procedure in a sybase database, which takes two arguements: create procedure pGetCodes @i_code varchar(32), @i_code_scheme char(8)asbegin select ECM2.code, ECM2.code_scheme, ECM2.source_id, ECM2.stock_exchange_id from refdb_rep..EXTERNAL_CODE_MARKET ECM1 join refdb_rep..EXTERNAL_CODE_MARKET ECM2 on ECM1.instrument_id = ECM2.instrument_id where ECM1.code = @i_code and ECM1.code_scheme = @i_code_scheme order by ECM2.code_schemeendThese arguements are supplied by a textbox and a dropdown as ControlParameters: &...

VB.NET SQL stored procedure: procedure has no parameters and arguments were supplied
VB.NET SQL stored procedure: procedure has no parameters and arguments were supplied Please assist me:This erorr message is produce when calling the stored procedure in vb.netProcedure AutomateMatterNumber has no parameters and arguments were supplied."MS SQL 2000stored procedure:*/CREATE PROCEDURE dbo.AutomateMatterNumber ASDECLARE @nextMtr AS BIGINTDECLARE @dtToday AS DATETIMEIF NOT EXISTS(SELECT * FROM tempMatter WHERE DATEDIFF(dd,DateSet,GETDATE())=0 )BEGINDELETE FROM tempMatter-- incase there are some old recordsSELECT TOP 1 @nextMtr= CONVERT(BIGINT, MatterNumber) + 1 ,@dtTod...

Stored Procedure parameter
Is it possible to pass a SQL command, as a character string, as a parameter to a stored procedure? If so, any suggestions on how this could be done? Thanks Certainly. create procedure myprocedure @p1 varchar(255) as select @p1 go declare @cmdstring varchar(255) select @cmdstring = "select * from sysobjects" execute myprocedure @cmdstring go Now, if you want the stored procedure to be able to actually execute that string, you would have to be on a version of ASE that supports EXECUTE IMMEDIATE, and you would write the procedure as: create procedure myp...

Stored procedure parameters
Hi what's the difference between using parameters in these two ways: SELECT @PortalName = Portals.PortalName ... and SELECT Portals.PortalName... first one will NOT be a result set, and second one will Whats the basic difference between that? I need to use a NextResult method within a .cs filebut it is not working thanks Your first statement is selecting the results of your query into a variable.  If more than one row is returned that statement will generate an error.  Typically that variable is set up as an output parameter.  This approach works well when you ne...

Stored Procedures and parameters
How many parameters can I use for a Stored Procedure.  Johan TheunissenMCPD, MCSE, MCTS BizTalk 2006==============================Please mark the most helpful reply/replies as "Answer". "The maximum number of arguments for stored procedures is 2048" Taken from: Creating and Executing Stored Procedures RegardsBilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP haidar_bilal:"The maximum number of arguments for stored procedures is 2048" Taken from: Creating and Executing Stored ProceduresThat's for Sybase, Bilal .  For SQL Server 2000 and 2005, the maxim...

Stored procedure and Delphi
Hello! I use SQL Anywhere 5.5 as a SQL server and Delphi 5 as client applications development tool. I confront with a problem. I have some stored procedure. It takes no parameters, and I want to execute it from my client application. All actions are standard for it. I put a component TStoredProc on a form, make all actions to connect it to a database and SP. It is a procedure that executes selection. When I make StoredProc1.ExecProc I get a message about error "Wrong number of parameters". When I add some dummy IN parameter into SP that takes no part in SP work al...

Web resources about - Blob from Parameter in Stored Procedure - embarcadero.delphi.interbase

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google Webmaster Tools Parameter Handling - Flickr - Photo Sharing!
You aren't signed in Sign In Help Home The Tour Sign Up Explore Explore Home Last 7 Days Interesting Popular Tags Calendar Most Recent Uploads ...

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 12/17/2015 8:22:37 AM