using SQL like command in ASP - 8/21/2001 20:43:00
Let me firstly reiterate the comments of IWpunk and state that this forum definitely rocks. I had difficulty in running FP98 and PWS4.0. It now works thanks to Spooky.Being able to play and experiment with FP98 and databases for the last few days has been great. However, there is another sticking point which I would be grateful if anyone could advise me on. The following code is from an ASP response page for a simple database storing details of books: _____________________________________________ varAuthor= request.form("Author") dim ORSp Set oRSp=server.createobject("ADODB.recordset") sqltext="Select * from Main " sqltext=sqltext& " WHERE Author='" & varAuthor & "';" oRSp.open sqltext, "dsn=bookpost" _____________________________________________ It works well. However, I now want to be able for the search to return authors of books which are LIKE a certain author e.g. Twain. I know I can do this using SQL in access with the aid of LIKE and * * or ? ?. But how can I integrate the LIKE function in SQL into the following line which is taken from above? sqltext=sqltext& " WHERE Author='" & varAuthor & "';" I would be most appreciative of anyones help in this matter? Many thanks Spacker
|