Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008

    Unanswered: Problems with Access & ASp

    Hi I'm not sure if i have posted this in the right place but i am having a lot of problems with on line of code with in my asp. I have connected an access database with a list of genres in a genres table (tblGenres) and then a products table (tblProducts) with the relationship of many products can have one genre and one genre to many products. I am now trying to make it so that when a user selects a genre on one page it will load another page with a list of all the products for that genre. the code that i am having particular trouble with is...
    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.Open "SELECT * FROM tblProducts WHERE tblProducts.GenreID = " & Request.QueryString("GenreID"), objConn
    The error that keeps arising in the web browser is...

    Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

    [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

    /groupa3/ListProducts.asp, line 20
    Any help would be much appreciated.

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Ok, first thing's first...

    Do not use the dreaded SELECT *

    So I assume GenreID is numeric within your database?
    Home | Blog

  3. #3
    Join Date
    Jul 2003
    Amsterdam, Nederland

    see if this helps

  4. #4
    Join Date
    Dec 2007
    Try using + instead of & . I dont really think it will help but... I think i had this broblem once and it fixed it.
    Last edited by noamsmadja; 01-15-08 at 04:39.

Posting Permissions

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