sqlstring = sqlstring & "from booking where booking.bookingid = bookingid"
whats wrong with that select statement?
when i run it,it suppose to give me fields for specific booking id, but it shows specific fields for all booking
need help pls
Printable View
sqlstring = sqlstring & "from booking where booking.bookingid = bookingid"
whats wrong with that select statement?
when i run it,it suppose to give me fields for specific booking id, but it shows specific fields for all booking
need help pls
I would need to see the whole SQL statement to be able to answer that.
dim bookingid as integer
lstbookingid = bookingid
'lstbookingid is a listbox
select bookingdate from booking where bookingid = bookingid
Try this:
You also may have to convert bookingid to the correct data type,Code:bookingid = lstbookingid.List(lstbookingid.ListIndex)
depending upon you table definitions.
I don't get it!
You don't assign a value to bookingid (but you're trying to assign bookingid to a listbox).
Then in your first post you have the following code:What value does the sqlstring have for value to start with? And does it end with a space so there is a space before it adds "from booking" to it?VB Code:
sqlstring = sqlstring & "from booking where booking.bookingid = bookingid"