Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to get return type (Resultset) information from databa..

 
   Database Forums (Home) -> Object-Oriented RSS
Next:  La hormiga que no podia ir a la luna  
Author Message
Gaj

External


Since: Nov 11, 2005
Posts: 1



(Msg. 1) Posted: Fri Nov 11, 2005 2:46 am
Post subject: How to get return type (Resultset) information from database
Archived from groups: comp>databases>object (more info?)

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

 >> Stay informed about: How to get return type (Resultset) information from databa.. 
Back to top
Login to vote
Hieu Hoang

External


Since: Nov 14, 2005
Posts: 2



(Msg. 2) Posted: Mon Nov 14, 2005 1:55 pm
Post subject: Re: How to get return type (Resultset) information from data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.

 >> Stay informed about: How to get return type (Resultset) information from databa.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
developing a Object Oriented Database -

Aggregation in FastObjects. How to define that in opt file? - Hello, I have theses java classes: - Course <<key>> code : short name : string gratingCurricular : set<Period> - Period <<key>> numPeriod : short anything: set<someThing> * For eac...

Help : How to manage stars in database ? - All, Any help would be gratefully appreciated. I have this trouble : In database in one column I have record like that : 000000001 0*6666**66 005555555 Stars could be anything between '0' and '9' So, if I look for this id : 0166662066, it would be..

Problems with sorting datas with db4o using orderderAscend.. - Hi, I have created a class "result" with several attributes. Then I have inserted approximately 10000 object result, stored in a yap file. I can get the data and display them. I'd like to know if it is possible, using the functions of db4o, t...

Thinking of going with object db - Hi Folks, Im about to start a new ASP.NET based intranet system that will be used by intially 100 people but in years to come could be 10x that. Ill have a domain model layer and like the idea of not having to write OR mapping layer or paying for a..
   Database Forums (Home) -> Object-Oriented All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]