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
Bhavesh Jadav
NA
1.2k
17.6k
Specified cast is not valid. in LINQ query.
Apr 23 2018 1:23 AM
Hello, everyone please help me to solve my error.
Specified cast is not valid. in LINQ query. a code is given below
try
{
var result = (from tbl1
in
dsSearchdata.Tables[1].AsEnumerable()
join tbl2
in
dsCategoryProducts.Tables[0].AsEnumerable()
on tbl1.Field<
int
>(
"ProductId"
) equals tbl2.Field<
int
>(
"ProductId"
)
select tbl1);
if
(result.Count() > 0)
{
DataTable dt =
new
DataTable();
dt = result.CopyToDataTable();
dsSearchdata.Tables[i].Rows.Clear();
dsSearchdata.Tables[i].Merge(dt,
true
);
}
else
{
dsSearchdata.Tables[i].Rows.Clear();
}
}
catch
(Exception ex)
{
}
It generate exeption 'Specified cast is not valid.'
Thanks in advance.
Reply
Answers (
3
)
how to get key of visual studio 2017 community
can anyone give details about web api token authentication