TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
Abdalla Elawad
NA
1k
215k
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