|
-
Nov 10th, 2004, 09:53 AM
#1
Thread Starter
New Member
building cbo boxes
what am I doing wrong?
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
OleDbConnection1.Open()
OleDbDataAdapter1.SelectCommand.CommandText = "SELECT Location, HotelID FROM Hotel"
OleDbDataAdapter1.SelectCommand.ExecuteNonQuery()
Do
ComboBox1.Items.Add(OleDbDataAdapter1.SelectCommand.CommandText)
Loop
OleDbConnection1.Close()
End Sub
-
Nov 10th, 2004, 11:43 AM
#2
Calling ExecuteNonQuery to execute the Select statement (which is a query).
Adding the same value to the combobox each time.
There is an endless loop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|