Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help in connecting my database to a website

    Trying to connect my database to my website -- Vista

    I've been working on this weeks now and can't seem to move forward. I am trying to link a database to my website using frontpage 2003 and access 2007 for my project. my website deals with reserving equipment for a copmany i have these fields in my database

    reservation title

    Reservation#
    CustomerID
    Reservationdate
    EquipmentNo
    Equipmentname
    Category


    I have converted the access 2007 database to 2000 file format and am currently getting this error

    Microsoft JET Database Engineerror '80040e07'

    Data type mismatch in criteria expression. /companysite5/reservation.asp, line 22


    Here is my code that i have placed in an reservfation.asp page

    <%
    sconnstring="PROVIDER=Microsoft.Jet.OLEDB.4.0;"& _
    "Data Source=" & Server.Mappath("companydb00.mdb")
    Set rs = Server.CreateObject("ADODB.Connection")
    CustomerID = Request.Form("CustomerID")
    Reservationdate = Request.Form("Reservationdate")
    EquipmentNo = Request.Form("EquipmentNo")
    Equipmentname = Request.Form("Equipmentname")
    Category = Request.Form("Category")
    Quantity = Request.Form("Quantity")
    sql = "INSERT into reservation (CustomerID,Reservationdate,EquipmentNo,Equipmentname,Category,Quantity) Values ('" & CustomerID &"', '" & Reservationdate &"', '" & EquipmentNo &"', '" & Equipmentname &"', '" & Category &"', '" & Quantity &"')"
    rs.open(sconnstring)
    rs.execute(sql)
    rs.close
    response.write"Your Reservation has been Sucessfully Submitted"
    resopnse.write (reservationNo)
    %>

    PLEASE HELP ME ANY ASSISTANCE WILL BE GREATLY APPRECIATED.

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Quote Originally Posted by natte700 View Post
    reservation title
    Reservation#
    CustomerID
    Reservationdate
    EquipmentNo
    Equipmentname
    Category
    ...
    Code:
    <%
    ...
    sql = "INSERT into reservation (CustomerID,Reservationdate,EquipmentNo,Equipmentname,Category,Quantity) Values ('" & CustomerID &"', '" & Reservationdate &"', '" & EquipmentNo &"', '" & Equipmentname &"', '" & Category &"', '" & Quantity &"')" 
    ...
    %>
    assuming that the missed out quantity column is just a typo...you are trying to insert quantity as a string
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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