Access Call Error

Results 1 to 2 of 2

Thread: Access Call Error

  1. #1
    Join Date
    Dec 1969

    Default Access Call Error

    I am very new to ASP so please bear with me.<BR><BR>I am developing a catalog, that is accessing an access database.<BR>In the main catalog page I am getting a list of distinct product categories and placing them inside a drop down box and sending the data using POST to send the selected category to the product listing page (this page will only display products from within the category specified on the first page).<BR><BR>When I select a category and click submit I receive the following error:<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)<BR>[Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.<BR>/product_listings.asp, line 8<BR><BR>This is the code I am using on the next page:<BR>&#060;%<BR>Option Explicit<BR>Dim Conn<BR>Dim RSProducts<BR>Dim TheMessage<BR>set conn = server.createobject ("adodb.connection")<BR>"DRIVER={Microso ft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("mydatabase.mdb"))<BR>set RSProducts = Conn.Execute("Select ProductName, from OSProducts" & "Where ProductCategory Like &#039%" & Request.Form("CategoryName") & "%&#039 Order By ProductName")<BR>TheMessage = "Products in category: " & Request.Form("CategoryName")<BR>%&#062;<BR><BR>Any Assistance is greatly appreciated.<BR><BR>ASP and Programming Newbie<BR>

  2. #2
    InstrRev Guest

    Default RE: Access Call Error

    dim sqlstr<BR>sqlstr="Select ProductName from OSProducts " &_<BR>"Where ProductCategory Like &#039%"&Request.Form("CategoryName") &_<BR>"%&#039 Order By ProductName"<BR><BR>set RSProducts = Conn.Execute(sqlstr)

Posting Permissions

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