473,406 Members | 2,620 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,406 software developers and data experts.

Procedure or function 'REGSTD' expects parameter '@FIRSTNAME', which was not supplied

This is the code iam using
.............
Expand|Select|Wrap|Line Numbers
  1.   Dim con As New SqlConnection
  2.         con.ConnectionString = " Data Source=(local)\sqlexpress; initial Catalog=SEC; Integrated security=true;   "
  3.         con.Open()
  4.         Dim cmd As New SqlCommand()
  5.         cmd.CommandText = "REGSTD"
  6.         cmd.CommandType = Data.CommandType.StoredProcedure
  7.         cmd.Parameters.AddWithValue("STUDENT_ID", Txtid.Text)
  8.         cmd.Parameters.AddWithValue("STUDENT_FNAME", Txtfname.Text)
  9.         cmd.Parameters.AddWithValue("STUDENT_SNAME", TxtSName.Text)
  10.         cmd.Parameters.AddWithValue("STUDENT_LNAME", TxtTName.Text)
  11.         cmd.Parameters.AddWithValue("STUDENT_GNAME", TxtGName.Text)
  12.         cmd.Parameters.AddWithValue("GENDER", DropDownListgender.SelectedItem.Value)
  13.         cmd.Parameters.AddWithValue("PLACEOFBIRTH", TxtPOB.Text)
  14.         cmd.Parameters.AddWithValue("MOTHER_NAME", TxtFMotherName.Text)
  15.         cmd.Parameters.AddWithValue("School", DropDownListSchool.SelectedItem.Value)
  16.         cmd.Parameters.AddWithValue("Region", DropDownListRegion.SelectedItem.Value)
  17.         cmd.Parameters.AddWithValue("District", DropDownListDistrict.SelectedItem.Value)
  18.         cmd.Parameters.AddWithValue("STREAM", DropDownListStream.SelectedItem.Value)
  19.         cmd.Parameters.AddWithValue("BATCH", TxtBatch.Text)
  20.         cmd.Parameters.AddWithValue("Photo", FileUploadPhoto.FileName)
  21.         cmd.Parameters.AddWithValue("Approval", TxtApproval.Text)
  22.         cmd.Parameters.AddWithValue("ApprovedDate", TxtApprovalDate.Text)
  23.         cmd.Connection = con
  24.         Label19.Text = cmd.ExecuteScalar
  25.  
  26.         con.Close
Jul 9 '12 #1
1 2296
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.

That error message can't be clearer. It's looking for the parameter '@FIRSTNAME', which you didn't supply.
Jul 9 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Senthil | last post by:
Hi, I created a stored procedure in the sql server. I try to insert a record from the aspx page. But I keep getting this error, "procedure expects parameter <@firstname>, which was not...
1
by: jfturcott | last post by:
Prepared statement '(@p1 int,@p2 tinyint,@p3 varchar(8000),@p4 varchar(8000),@p5 bit' expects parameter @p1, which was not supplied. I get the above error when trying to update a datagridview to...
1
by: malayappa | last post by:
Hi All here is the error what i m getting Warning: domdocument::domdocument() expects parameter 2 to be long, string given in D:\Program Files\Apache Software...
1
by: karenkksh | last post by:
HI, protected void btnUpdate_Click(object sender, EventArgs e) { SqlConnection MyConnection; SqlCommand MyCommand; MyConnection = new SqlConnection(); ...
7
by: Cirene | last post by:
I have a stored procedure named insertcompany. I keep getting the error: Sys.webforms.pagerequestmanagerservererrorexception: Procedure or function 'InsertCompany' expects parameter...
3
by: ghjk | last post by:
I want to expire user account in my php application. Below is my code . But i got "mktime() expects parameter 6 to be long, string given in ". Could anyone tell me what is wrong? Please.. ...
3
by: sumandak | last post by:
I want to insert data from User Input to DB (MySQL 2005) using stored proc and a report to show the data which has one parameter at a time to view information. I've tried for almost 2 weeks on...
1
by: dragos42 | last post by:
m from Romania and I bought the book let yourself, bother with a problem to conduct script 14.2 appear: The file has been uploaded! Warning: mysqli_query() expects parameter 1 to be mysqli,...
3
BRawn
by: BRawn | last post by:
Hi, I'm writing an application which needs SQL parameters to be passed, and even though I've assigned parameters to the stored procedure, I keep getting the following error message from the...
12
by: Rana Chakra | last post by:
<?php $username="root"; $password=""; $database="lko_phone"; $host="localhost"; $msg=""; mysql_connect($host,$username,$password); @mysql_select_db($database); if($_SERVER == "POST")
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
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
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
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.