Hi, Is it possible to store a do while loop result set into one variable. If i response.write SMSResults var below it loops through and gives me the rows i expect to see based on my query but when i want to take the results in one variable outside the loop i just get one row... Any help would be appreciated.
Thanks
Thanks
Code:
qryAvailabilityCheck = "SELECT Top 8 company, type, phone, postcode FROM wce_contact WHERE Rooms = '1' AND Postcode <> '' AND idstatus = 'Property' AND Postcode LIKE '%"& MessageTextPcodeorPhone &"%' OR phone LIKE '%"& MessageTextPcodeorPhone &"%' ORDER BY NEWID()"
Set oRsAvailability = connStr.Execute(qryAvailabilityCheck)
'response.write(qryAvailabilityCheck)&"<br/>"
'response.end
Do While Not oRsAvailability.eof
'Items to send to Enquiries
company = oRsAvailability("company")
PropertyType = oRsAvailability("type")
phone = oRsAvailability("phone")
SMSResults=(company)&" "&(propertytype)&" "&(phone)&"<br/>"
response.write(SMSResults)
'response.end
oRsAvailability.MoveNext
Loop