hi
hello Programmers i faced a brolem in searching events becaues i used filed contains to 10 digits as nvarchar i will attache code and table to explain more this problem .
Soory System faced problem to upload file , generally this is code below
IqamaNo is Nvarchar(10) contains to 10 digits how to search by by this type of datatype , if i need to convert to this type please help me how can i convert it .
thanks
string mainconn = ConfigurationManager.ConnectionStrings["Con_VisitorsControl"].ConnectionString;
SqlConnection sqlconn = new SqlConnection(mainconn);
string sqlquery = "select VisitorName, IqamaCopy from [dbo].[tbl_Visitors] where IqamaNo= ' " + txtno.Text + " ' ";
SqlCommand sqlcomm = new SqlCommand(sqlquery, sqlconn);
sqlconn.Open();
SqlDataAdapter sda = new SqlDataAdapter();
sda.SelectCommand = sqlcomm;
DataSet ds = new DataSet();
sda.Fill(ds);
DataList1.DataSource = ds;
DataList1.DataBind();
sqlconn.Close();


Dinesh GabhaneRank #265 · 9.5K reputationPosted Nov 11, 2019, 8:39 PM EST
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Nov 11, 2019, 8:59 PM EST
Jayanth ReddyRank #8,652 · 218 reputationPosted Nov 11, 2019, 10:15 PM EST
Jenith ThakkarRank #789 · 2.9K reputationPosted Nov 12, 2019, 7:29 PM EST