问题描述
问题陈述是
'/'应用程序中的服务器错误。
参数化查询'(@ user_no nvarchar(1) ,@ username nvarchar(4),@ password nvarchar(5'需要参数'@institlisn',这是未提供的。
描述:期间发生了未处理的异常当前Web请求的执行。请查看堆栈跟踪以获取有关错误及其在代码中的起源的更多信息。
异常详细信息:System.Data。 SqlClient.SqlException:参数化查询'(@ user_no nvarchar(1),@ username nvarchar(4),@ password nvarchar(5'需要参数'@institlisn',这是未提供的。
来源错误:
第110行:cmd1.Parameters.AddWithValue(@ map_path,Image2 .ImageUrl)
第111行:
第112行:cmd1.ExecuteNonQuery()
第113行:conn.Close()
第1行14:Label1.Text =تمقبولالمشترك
----------------------- ----------------
需要这段代码的帮助:
the problem statement is
Server Error in '/' Application.
The parameterized query '(@user_no nvarchar(1),@username nvarchar(4),@password nvarchar(5' expects the parameter '@institlisn', which was not supplied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The parameterized query '(@user_no nvarchar(1),@username nvarchar(4),@password nvarchar(5' expects the parameter '@institlisn', which was not supplied.
Source Error:
Line 110: cmd1.Parameters.AddWithValue("@map_path", Image2.ImageUrl)
Line 111:
Line 112: cmd1.ExecuteNonQuery()
Line 113: conn.Close()
Line 114: Label1.Text = "تم قبول المشترك "
---------------------------------------
need help to this code :
Dim cmd1 As New SqlCommand("select user_no,username,password,email,institname,institlisn,lisn_path,stutus,mobile,city,area,town,cord_x,cord_y,map_name,map_path from users1", conn)
Dim da As New SqlDataAdapter(cmd1)
Dim ds As New DataSet()
da.Fill(ds, "orders")
TextBox1.Text = ds.Tables("orders").Rows(i).Item(0).ToString
TextBox2.Text = ds.Tables("orders").Rows(i).Item(1).ToString
TextBox3.Text = ds.Tables("orders").Rows(i).Item(2).ToString
TextBox4.Text = ds.Tables("orders").Rows(i).Item(3).ToString
TextBox5.Text = ds.Tables("orders").Rows(i).Item(4).ToString
Image1.ImageUrl = ds.Tables("orders").Rows(i).Item(7).ToString
TextBox6.Text = ds.Tables("orders").Rows(i).Item(6).ToString
TextBox7.Text = ds.Tables("orders").Rows(i).Item(8).ToString
TextBox8.Text = ds.Tables("orders").Rows(i).Item(9).ToString
TextBox9.Text = ds.Tables("orders").Rows(i).Item(10).ToString
TextBox10.Text = ds.Tables("orders").Rows(i).Item(11).ToString
Image2.ImageUrl = ds.Tables("orders").Rows(i).Item(14).ToString
cmd1.Parameters.Clear()
cmd1.Parameters.AddWithValue("@user_no", TextBox1.Text)
cmd1.Parameters.AddWithValue("@username", TextBox2.Text)
cmd1.Parameters.AddWithValue("@password", TextBox3.Text)
cmd1.Parameters.AddWithValue("@email", TextBox5.Text)
cmd1.Parameters.AddWithValue("@institname", TextBox4.Text)
cmd1.Parameters.AddWithValue("@institlisn", Session("order_institlisn"))
cmd1.Parameters.AddWithValue("@lisn_path", Image1.ImageUrl)
cmd1.Parameters.AddWithValue("@stutus", "مشترك جديد")
cmd1.Parameters.AddWithValue("@mobile", TextBox7.Text)
cmd1.Parameters.AddWithValue("@city", TextBox8.Text)
cmd1.Parameters.AddWithValue("@area", TextBox9.Text)
cmd1.Parameters.AddWithValue("@town", TextBox10.Text)
cmd1.Parameters.AddWithValue("@cord_x", Session("@cord_x"))
cmd1.Parameters.AddWithValue("@cord_y", Session("@cord_y"))
cmd1.Parameters.AddWithValue("@map_name", Session("map_name"))
cmd1.Parameters.AddWithValue("@map_path", Image2.ImageUrl)
cmd1.ExecuteNonQuery()
conn.Close()
Label1.Text = "تم قبول المشترك "
推荐答案
这篇关于参数化查询'(@ user_no nvarchar(1),@ username nvarchar(4),@ password nvarchar(5'需要参数'@institlisn',未提供。描述:未处理的异常......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!