Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
9
Reply
How to stop a loop when its the end of database
Israel
Aug 2 2017 6:14 PM
293
Reply
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();
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
9
)
Next Recommended Forum
datagridview selectedRow value display value multi textbox
Telerik RadGridView Column not auto sizing in c# winform