Will Web 3.0 Replace Web 2.0?
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Abdalla Elawad
1.2k
1k
186.3k
how can i search by Nvarchar(10) as integer number c#
Nov 12 2019 1:33 AM
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();
Reply
Answers (
4
)
how to convert the Nvarchar to Integer with Select c#
visual studio 2019 debugging