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
Israel
695
1.3k
219.8k
How to stop a loop when its the end of database
Aug 2 2017 6:14 PM
Hi!
With these codes its making a loop. But the problem is its displaying the record into combobox until the last record of my dababase. But later this work its doesnt stop. Its sound making the loop without stop. I have to stop it manually because with the exit button its doesnt stop:
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\BlessFive\BlessFive\App_Datas\blessfive.mdb;Persist Security Info=False");
con.Open();
OleDbCommand cmd = new OleDbCommand("select numbers from Receive_Numbers_To_Send", con);
OleDbDataAdapter SDA = new OleDbDataAdapter();
SDA.SelectCommand = cmd;
DataTable DT = new DataTable();
SDA.Fill(DT);
cbxSMSSending.DataSource = DT;
con.Close();
Application.DoEvents();
ia++;
int milliseconds = 2000;
Thread.Sleep(milliseconds);
//button6.PerformClick();
//btnEnvoiSMS_PrincipalEntry.PerformClick(); //Trigger click event
//btnAffiche.PerformClick();
Reply
Answers (
9
)
lock óbject /statement
Got ObjectDisposedExceptionerror after opening