...

View Full Version : Help in connecting my database to a website



natte700
10-18-2008, 04:41 PM
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.

shyam
10-18-2008, 04:53 PM
reservation title
Reservation#
CustomerID
Reservationdate
EquipmentNo
Equipmentname
Category
...

<%
...
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum