Re: How to get return type (Resultset) information from database storeprocedure object programmatically
- From: Hieu Hoang <cr.hieuhoang@xxxxxxxxxxxxxxx>
- Date: Mon, 14 Nov 2005 18:08:11 +0000
Gaj wrote:
> Hai,
>
> For Example Below are two storeprocedures one returns resultset and
> other not, how get this information through programmatically.
>
> 1)CREATE PROCEDURE dbo.UpdateCustomers
> (
> @CustomerID nchar(5),
> @CompanyName nvarchar(40),
> @ContactName nvarchar(30),
> @City nvarchar(15),
> @Phone nvarchar(24),
> @Original_CustomerID nchar(5),
> @Original_City nvarchar(15),
> @Original_City1 nvarchar(15),
> @Original_CompanyName nvarchar(40),
> @Original_ContactName nvarchar(30),
> @Original_ContactName1 nvarchar(30),
> @Original_Phone nvarchar(24),
> @Original_Phone1 nvarchar(24)
> )
> AS
> SET NOCOUNT OFF;
> UPDATE Customers SET CustomerID = @CustomerID, CompanyName =
> @CompanyName, ContactName = @ContactName, City = @City, Phone = @Phone
> WHERE (CustomerID = @Original_CustomerID) AND (City = @Original_City OR
> @Original_City1 IS NULL AND City IS NULL) AND (CompanyName =
> @Original_CompanyName) AND (ContactName = @Original_ContactName OR
> @Original_ContactName1 IS NULL AND ContactName IS NULL) AND (Phone =
> @Original_Phone OR @Original_Phone1 IS NULL AND Phone IS NULL)
>
> GO
>
> 2)CREATE PROCEDURE dbo.AllCustomers
> /*
> (
> @parameter1 datatype = default value,
> @parameter2 datatype OUTPUT
> )
> */
> AS
> Select * from Customers
> RETURN 0
>
>
> GO
>
>
> Thanks in advance.
>
>
> Thanks
> --Gaj
>
this looks like sybase or ms sql server, u're in an object-oriented db
forum.
however, it should be very easy to do what u want. just check how many
columns the recordset has.
.
- References:
- Prev by Date: How to get return type (Resultset) information from database storeprocedure object programmatically
- Next by Date: Re: Help : How to manage stars in database ?
- Previous by thread: How to get return type (Resultset) information from database storeprocedure object programmatically
- Index(es):
Relevant Pages
|