criteria= trim(request.QueryString("name"))
sqlstring="SELECT customer.customer_id from flight inner join booking on flight.flight_id=booking.flight_id inner join customer ON booking.customer_id = customer.customer_id WHERE flight.flight_name LIKE '%criteria%'"
set objrsflight = server.CreateObject("ADODB.Recordset")
objrsflight.Open sqlstring, strconnect , adOpenDynamic , adLockOptimistic , adCmdText
objrsflight.Close
set objrsflight = nothing
i tried to run that code in asp with the following tables in sql server 2000
flight booking customer
flight_id flight_id customer_id
flight_name customer_id customer_name
etc. etc. etc.
the sql runs fine but when i use recordcount or pagecount i get -1
but there is no error message, but when i try to retrive the value using
response.Write objrsflight("customer_name") i get
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
can anyone help

i've noticed that when i remove the where clause this works

then i have to filter the recordset again, i would have prefferred to do it in the sql statement itself
can anyone help?