This is the code iam using
............. - Dim con As New SqlConnection
-
con.ConnectionString = " Data Source=(local)\sqlexpress; initial Catalog=SEC; Integrated security=true; "
-
con.Open()
-
Dim cmd As New SqlCommand()
-
cmd.CommandText = "REGSTD"
-
cmd.CommandType = Data.CommandType.StoredProcedure
-
cmd.Parameters.AddWithValue("STUDENT_ID", Txtid.Text)
-
cmd.Parameters.AddWithValue("STUDENT_FNAME", Txtfname.Text)
-
cmd.Parameters.AddWithValue("STUDENT_SNAME", TxtSName.Text)
-
cmd.Parameters.AddWithValue("STUDENT_LNAME", TxtTName.Text)
-
cmd.Parameters.AddWithValue("STUDENT_GNAME", TxtGName.Text)
-
cmd.Parameters.AddWithValue("GENDER", DropDownListgender.SelectedItem.Value)
-
cmd.Parameters.AddWithValue("PLACEOFBIRTH", TxtPOB.Text)
-
cmd.Parameters.AddWithValue("MOTHER_NAME", TxtFMotherName.Text)
-
cmd.Parameters.AddWithValue("School", DropDownListSchool.SelectedItem.Value)
-
cmd.Parameters.AddWithValue("Region", DropDownListRegion.SelectedItem.Value)
-
cmd.Parameters.AddWithValue("District", DropDownListDistrict.SelectedItem.Value)
-
cmd.Parameters.AddWithValue("STREAM", DropDownListStream.SelectedItem.Value)
-
cmd.Parameters.AddWithValue("BATCH", TxtBatch.Text)
-
cmd.Parameters.AddWithValue("Photo", FileUploadPhoto.FileName)
-
cmd.Parameters.AddWithValue("Approval", TxtApproval.Text)
-
cmd.Parameters.AddWithValue("ApprovedDate", TxtApprovalDate.Text)
-
cmd.Connection = con
-
Label19.Text = cmd.ExecuteScalar
-
-
con.Close
1 2296
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
by: karenkksh |
last post by:
HI,
protected void btnUpdate_Click(object sender, EventArgs e)
{
SqlConnection MyConnection;
SqlCommand MyCommand;
MyConnection = new SqlConnection();
...
|
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...
|
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..
...
|
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...
|
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,...
|
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...
|
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")
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
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...
|
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,...
|
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...
|
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,...
|
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,...
|
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...
| | |