Re: ntext/>8K as OUTPUT param

From: Jacco Schalkwijk (jacco.please.reply_at_to.newsgroups.mvps.org.invalid)
Date: 02/09/05


Date: Wed, 9 Feb 2005 12:39:36 -0000

You can create a temporary table in the calling stored procedure, and then
call the other stored procedure to fill this table. See for further
explanation:

http://www.sommarskog.se/share_data.html#temptables

-- 
Jacco Schalkwijk
SQL Server MVP
"Steve Norman" <SteveNorman@discussions.microsoft.com> wrote in message 
news:8704ABDF-1843-4EC3-BB2F-4C8AA9B12E86@microsoft.com...
> Hi,
>
> I am trying to work out a way of returning some data from a SP to be used 
> in
> a calling SP.  There is a large amount of data, more than 8k, so I need to
> use ntext but I cannot create a local var of type ntext to hold the output
> before I can process it.
> You may be wondering why I don't just return this data as a table from the
> SP and insert it into a temp table and use that, but this stored procedure
> will be being called from another SP and I have found that you cannot nest
> INSERT INTO EXEC statements.  I cannot turn the SP into a UDF as the SP is
> very complex and needs to EXEC some sql which cannot be done in a UDF.
> I have found some references to calling a COM .dll using sp_OA*, but I am
> not sure this will help me in any way.
>
> Does anyone know what types I can return from the .dll that can be used in 
> a
> SP that will help me?
>
> Sorry for the long question, but any help will be appriciated.
> Steve 


Relevant Pages

  • Re: possible to call a table valued User Defined Function thru ODBC
    ... How is calling a UDF simpler than calling a stored procedure? ... I have existing code that uses ODBC and calling UDFs ...
    (microsoft.public.sqlserver.odbc)
  • Re: DBD::Sybase and $sth->{syb_result_type} v. DBD::ODBC (Sql Server)
    ... write output parameters and return a value. ... individual operations in the procedure by calling odbc_more_results. ... Things get a little more complex for what I guess Sybase calls CS_MSG_RESULT ... the status from a stored procedure was ...
    (perl.dbi.users)
  • Re: xplog70.dll
    ... What extended stored procedure are you calling from ... >I have a job that executes a DTS-package which in turn call a store procedure ...
    (microsoft.public.sqlserver.security)
  • Re: Foreign key constraints problem in SNC SQL Native client
    ... calling one stored procedure before calling dw_1.update method. ... stored procedure system is trying to delete parent data from Table A. ... rows from table B before deleting the related rows from A. ...
    (microsoft.public.sqlserver.connect)
  • Re: Best practice
    ... > Best coding strategies for calling stored procedures from ASP.NET. ... > objOracleParameterSTATUS = new System.Data.OracleClient.OracleParameter ... > So on the whole we are setting 9 properties for a single parameter and if ... > this stored procedure accepts 10 parameters, then this process has to be ...
    (microsoft.public.dotnet.framework.aspnet)