Please help a beginner!

Results 1 to 4 of 4

Thread: Please help a beginner!

  1. #1
    Bloorini Guest

    Default Please help a beginner!

    I need the help of and asp guru!<BR>This is my code below:<BR><BR>qryClubCategory = request.querystring("ClubCategory")<BR>query1 = "SELECT * FROM Clubs WHERE ClubCategory LIKE &#039" & qryClubCategory<BR>set oRSw = server.Execute(query1)<BR>Do While rs.eof = False and rs.bof = False<BR>response.write oRSd("ClubManufacturer") & ("ClubName") & "<BR><BR>" <BR>rs.movenext<BR>Loop<BR><BR>However, I get this error message:<BR><BR>Microsoft VBScript runtime error &#039 800a01b6&#039 <BR><BR>Object doesn&#039t support this property or method: &#039Execute&#039 <BR><BR><BR>WHY???!!!!<BR><BR>Please help a beginner in great need.

  2. #2
    Azeem Guest

    Default RE: Please help a beginner!

    This is because Server does not support Execute method.<BR><BR>Two ways of doing it:<BR><BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR><BR>rs.o pen <-- sql statement -->, SOME OPTIONAL PARAMETERS<BR><BR>a second way would be<BR><BR>Set conn = Server.CreateObject ("ADODB.Connection")<BR><BR>conn.activeConnecti on = CONNECTION STRING GOES HERE<BR><BR>set rs = conn.Execute (SQL Statement)<BR><BR>To be honest with you the second approach is not usually used unless you are running a data manipulating sql. If you are running a data retrieval sql (which is the case here) the first approach would be better.<BR><BR>Thank you

  3. #3
    forgot something Guest

    Default RE: Please help a beginner!

    you have to first set the connection of the recordset by <BR>rs.activeConnection or rs.Connection I forget....

  4. #4
    Thankyou !!! Guest

    Default RE: Please help a beginner!

    Thanks mate!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts