|
-
Apr 11th, 2004, 05:09 AM
#1
Thread Starter
Lively Member
urgent please help me !!!
i got a problem to add a data to my checkedlistbox the command is like that
==============================================
Try
conn.Open()
Dim sql = "SELECT * FROM CustomerBooking WHERE cday='" & Me.day.Text & "' And cmonth='" & Me.month.Text & "' And carrivetime='" & Me.carrivetime.Text & "' And cyear ='" & Me.year.Text & "'"
cmd = New OleDbCommand(sql, conn)
Dim dr As OleDbDataReader = cmd.ExecuteReader
While dr.Read
Num1 = dr("tablenumber")
Me.CheckedListBox1.Items.Add(Num1)
End While
dr.Close()
conn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
==============================================
y the result given to me is a duplicate one ??
example i have 1,2,3 inside my database
and the checkedlistbox result is 1,2,3,1,2,3 double time
wat is the problem ?
please help
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
|