473,466 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

calling and use the StoredProcedure

Hello!

Is it possible to use a StoredProcedure when you have SqlDataAdapter or is
it
only possible when you have SqlCommand like
SqlCommand thisCommand = myConnection.CreateCommand;
thisCommand.CommandType = CommandType.StoredProcedure;
thisCommand.CommandText = "MyStoredprocedure";

As far as I can see how would you tell SqlDataAdaper that you will use a
StoredProcedure ?

//Tony
Aug 27 '08 #1
1 1148
Hello Tony,

the dataAdapter's SelectCommand property must be assigned to a sqlCommand
object with the commandtype set to 'CommandType.StoredProcedure' as you did
in your sample.

(yourDataAdapter.SelectCommand = yourSqlCommand)

Regards

Frank

-------------------------------
Frank Werner-Krippendorf
fr***@krippendorf-online.ch
Hello!

Is it possible to use a StoredProcedure when you have SqlDataAdapter
or is
it
only possible when you have SqlCommand like
SqlCommand thisCommand = myConnection.CreateCommand;
thisCommand.CommandType = CommandType.StoredProcedure;
thisCommand.CommandText = "MyStoredprocedure";
As far as I can see how would you tell SqlDataAdaper that you will use
a StoredProcedure ?

//Tony

Aug 27 '08 #2

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

Similar topics

1
by: Jon Cosby | last post by:
How do you call an existing procedure? My database has a procedure called "StudentSchedule" with one parameter, @StudentID. I'm trying to fill the results in a datagrid with a StoredProcedure...
4
by: Jeff | last post by:
Help!! I'm trying to convert a visual basic stand alone program into a Web Program using C#. There are a lot of Oracle packages already written that I am trying to use (unsuccessfully). Can...
0
by: JN | last post by:
Hello, I'm having problem calling stored procedures from Visual FoxPro database. I got the following exception error: "System.Data.OleDb.OleDbException: Unrecognized command verb" It seems...
1
by: Eric Land | last post by:
Help! I'm trying to call a parameterized stored proc in ASP.NET in VB. I am creating a command object and creating a parametr list, and assigning a value from a session variable (this is working)...
2
by: Roger | last post by:
I put this in the microsoft.public.dotnet.langueages.vb.data newsgroup, but noticed there aren't alot of people there frequently like this newsgroup. So I thought I would try here. I get an...
4
by: Peter Afonin | last post by:
Hello, I have a weirdest issue I've ever had. I have a function that enters some data into the Oracle table and returns the sequential row number for the new record (autonumber): Private...
9
by: Frank | last post by:
Hi, imagine there's a WEB application reading data from an Oracle database to visualize in using DataGrids in the clients browser. Yes, sounds simple, just create OracleConnection + OracleCommand...
4
by: eighthman11 | last post by:
I'm calling a stored procedure on a sql server from an access application. I just need the stored procedure to run I do not need any data returned from the stored procedure to my Access...
0
by: aravindalapat | last post by:
Hi All, I am facing an error when I try to invoke a remote nested stored proc. Please find the details below. 1) SP TEST1 is defined in DB2 instance DB2A. It is calling a stored procedure ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.