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
214.2k
how to convert the Nvarchar to Integer with Select c#
Nov 10 2019 4:04 AM
please help me and look to this code
string
mainconn = ConfigurationManager.ConnectionStrings[
"Con_VisitorsControl"
].ConnectionString;
SqlConnection sqlconn =
new
SqlConnection(mainconn);
string
sqlquery =
"select VisitorName, IqamaCopy from [dbo].[tbl_Visitors] where VisitorId = ' "
+ 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();
this VisitorId Is Nvarchar contain to 9 digits on sql how can i select and convert this fieldname in the c#
thanks
Reply
Answers (
4
)
Building this code
how can i search by Nvarchar(10) as integer number c#