473,513 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reg:stored procedure

how to insert values into stored procedure....
using vb.net application....
if any one knows send me the sample code... for that insert query

Nov 9 '06 #1
2 1094
You should post your question to the VB.Net newsgroup, this one is for C#.

Mark.
--
http://www.markdawson.org
"Satheesh Kumar" wrote:
how to insert values into stored procedure....
using vb.net application....
if any one knows send me the sample code... for that insert query

Nov 9 '06 #2
In C# the answer is

for stored proc like :
-----------------
Create Procedure SelectById
(
@ID int
)
AS

Select * from MyTable Where [ID] = @ID
----------------

the code would be:

string connectionString = "" // Put connection string here
using (SqlConnection conn = new SqlConnection(connectionString)){
using(SqlCommand sqlcom = new SqlCommand("SelectById",conn)){
sqlcom.CommandType = CommandType.StoredProcedure;
sqlcom.Parameters.Add("@ID",SqlDbType.Int).Value = 1; //the value to
pass in
SqlDataReader reader = sqlcom.ExecuteReader();
//Do something here with results
}
}

HTH - SharpDevelop and convert C# to VB.NET

Ciaran O'Donnell

"Satheesh Kumar" wrote:
how to insert values into stored procedure....
using vb.net application....
if any one knows send me the sample code... for that insert query

Nov 9 '06 #3

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

Similar topics

2
4907
by: Richard van Denzel | last post by:
Hi All, I've defined a table (m) with an double field (bedrag) in it and when I execute the next statement: INSERT INTO m (bedrag) VALUES('-7000,00'); the value get stored correctly. ...
1
508
by: Dave Posh | last post by:
I seem to be having a problem displaying time stored in mysql. The format stored in the database is 13:15:05. The database data type is time. I'm using asp vbscript and sql to retrieve the time...
0
1174
by: Shanmugasundaram Doraisamy | last post by:
Dear Group, We are using Postgresql 7.3.4 on Redhat 8.0 with Java 1.4.2. We are developing our applications in Java. We call stored procedures from the java program. Order numbers are generated...
7
3430
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
6
5083
by: yin_n_yang74 | last post by:
I am trying to create a report in Crystal Reports (v 8.5). I have a stored procedure to pull data from two databases and parameters. There are multiple one-to-many relationships and the stored...
1
1743
by: upstart | last post by:
Hi everyone…this is a tough one. You guys have been such a help before, hopefully you can point me in the right direction now. I have a Report I am working on that uses a stored procedure to...
15
1481
by: raghu | last post by:
int x; static int y; int *p; int main(void) { int i; int j=9; int *ptr; char *str = "GOOGLE"; static int a;
2
2208
by: vamsioracle | last post by:
hi I have few doubts in AOL. When we create a new form and attach it as a function to a menu in Apps, where are the details stored for example, menu info is stored in fnd_menu_entries ...
0
1524
by: shankarsunmicrosys | last post by:
Hi, I have my requirement as below. I have 10000 records coming from my select query.
0
7260
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
7160
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
7384
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
7537
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
7099
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
5685
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
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
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...
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.