473,320 Members | 1,926 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,320 software developers and data experts.

pass textbox value to storedprocedure

jed
I need to pass a value that is inserted by the user in a textbox to a
variable in my stored procedure. please help

Mar 26 '07 #1
3 3128
What have you tried?
Peter

<je*@auto-soft.co.zawrote in message
news:11**********************@p15g2000hsd.googlegr oups.com...
>I need to pass a value that is inserted by the user in a textbox to a
variable in my stored procedure. please help

Mar 26 '07 #2
jed
Well i have declared a variable in SQLExpress and need to assign the
value to it.i am
a newbie and am not sure how to start.should i create a connection to
sql in code then open the connection and try access it through there

Mar 26 '07 #3
On Mar 26, 5:16 pm, j...@auto-soft.co.za wrote:
Well i have declared a variable in SQLExpress and need to assign the
value to it.i am
a newbie and am not sure how to start.should i create a connection to
sql in code then open the connection and try access it through there
very simple

this.SqlCommand = new SqlCommand("myProcedureName",
this.SqlConnection);
this.SqlCommand.CommandType = CommandType.StoredProcedure;

this.SqlCommand.Parameters.Add("@variableName1",
SqlDbType.VarChar).Value = variableValue1;
this.SqlCommand.Parameters.Add("@variableName2",
SqlDbType.Int).Value = variableValue2;
Mar 26 '07 #4

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

Similar topics

3
by: Brian | last post by:
I am trying to pass a null value into a stored procedure so that it can save the data. I am using Microsoft's SQLHelper dll to do this. My example code is below. How do I pass in a null value...
9
by: Jay Douglas | last post by:
Hello, I am needing to pass a class object (this) by reference to a method in a different class. When I do the following code I get the error (Cannot pass '<this>' as a ref or out argument because...
1
by: Paul M. Frazier, Ph.D. | last post by:
I am writing a user information update page and I populate the form on Page_Load with the current values of the user's name, etc. When I change the text in one of the textbox controls (e.g.,...
1
by: DC Gringo | last post by:
I am trying to pass an input parater to SQL Server. The parameter is a URL querystring variable. I can't seem to get it to pass a variable, only a literal value... Help! In the following...
7
by: Peter D.C. | last post by:
Hi I want to update data hold in several textbox controls on an asp.net form. But it seems like it is the old textbox values that is "re-updates" through a stored procedure who updates a SQL...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
7
by: Sandy | last post by:
Hello - I have a form that when submitted checks the database and if the username is already taken, a label shows indicating same. I need to make that label NOT visible after the user clicks...
0
by: Rogelio Moreno | last post by:
Denis, I recommend you to bind the textbox controls to columns of your table inside your dataset, then get the bindingmanagerbase for the table, then use the position property of the...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.