473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

How to get return type (Resultset) information from database storeprocedure object programmatically

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

Nov 11 '05 #1
0 1357

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
3
by: Koen | last post by:
Hi, first of all, the machine setup server 1: - UDB2 7.2.5; COUNTRY=1, location = US, IBM1250 codepage - Locale: US English; Regional Settings: English; Keyboard: Dutch; decimal separator: ....
0
by: Srinivas.Gajula | last post by:
Hai, For Example Below are two storeprocedures one returns resultset and other not, how get this information through programmatically. 1)CREATE PROCEDURE dbo.UpdateCustomers (...
1
by: Chris | last post by:
Hi, I want to limit the amount of data shown in a page coming from a database. Everything works except that I get the error: "Unable to cast object of type...
6
by: joerg | last post by:
Hello world, my program connects to a db2 database and needs to find out the column names and data types for a specific table. The code works fine with mysql and derby, but returns an empty...
1
by: 276q | last post by:
I'm kind of new to asp.net from classic asp, I need to get records/ fields from a resultset to display on aspx page (no datalist, repeater, or datagrid): <script runat="server"> Sub...
0
by: Dayzz | last post by:
http://www.thescripts.com/forum/thread710917.html. Closing thread - Moderator] Hi Everyone I have a code in VB that calls a Dynamic store procedure in MySQL DB, when I execute this store...
1
by: oaklander | last post by:
Is it okay to keep creating queries with the same ResultSet Object reference (results)? Here is what I am currently using in my Database statements with Oracle and everything works but was wondering...
11
by: premprakashbhati | last post by:
hello sir, goodevening.... iam working on vb6.0 and sql2005. "select max(centreid) from regionmaster where centreid like '" & intBranchPrefix & "%'", DBConnection, adOpenKeyset,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.