|
-
Oct 14th, 2001, 09:04 AM
#1
Thread Starter
Member
Sql String Help Pls
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
-
Oct 14th, 2001, 09:07 AM
#2
I would need to see the whole SQL statement to be able to answer that.
-
Oct 14th, 2001, 09:09 AM
#3
Thread Starter
Member
dim bookingid as integer
lstbookingid = bookingid
'lstbookingid is a listbox
select bookingdate from booking where bookingid = bookingid
-
Oct 14th, 2001, 09:13 AM
#4
PowerPoster
Try this:
Code:
bookingid = lstbookingid.List(lstbookingid.ListIndex)
You also may have to convert bookingid to the correct data type,
depending upon you table definitions.
-
Oct 14th, 2001, 09:15 AM
#5
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:
VB Code:
sqlstring = sqlstring & "from booking where booking.bookingid = bookingid"
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?
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
|