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
scropio gurl
NA
147
99.2k
data continuously inserted in table
Jul 1 2016 8:11 AM
I try to send data in table when time exceed over 5 mint data is inserted successfully but data insert multiple times i want to submit data only one time
i.e. only one row insert for 1 number
this is what i try
if
(timediff.TotalMinutes > 5)
{
DataClasses1DataContext db =
new
DataClasses1DataContext();
var u = db.tbl_urgent_contacts;
foreach
(var a
in
u)
{
tbl_OutBox tb =
new
tbl_OutBox();
tb.FromSIM_No = a.SimNo;
tb.ToSIM_No = a.SimNo;
tb.ToText =
"Check abc"
;
tb.Reply =
"NA"
;
tb.Response =
"NA"
;
tb.RegNo =
"NA"
;
tb.Datetd = DateTime.Now;
tb.FFID =
"NA"
;
tb.UserId =
"You"
;
tb.FromText =
"Check abc"
;
db.tbl_OutBoxes.InsertOnSubmit(tb);
db.SubmitChanges();
}
}
Reply
Answers (
1
)
Which one is better in "LINQ to SQL" and "LINQ to Entity"??
Data continuously inserted in table