hi people
ive written a siomple script to inserta record into an Access data base, when i try to execute the code i get the following error, which i belive means that a colum in the table is not peresent (which it is)
46|80040e10|[Microsoft][ODBC_Microsoft_Access_Driver]_Too_few_parameters._Expected_1. 200 0 1419 962 70
heres my code
plaese help
thanks hemal
ive written a siomple script to inserta record into an Access data base, when i try to execute the code i get the following error, which i belive means that a colum in the table is not peresent (which it is)
46|80040e10|[Microsoft][ODBC_Microsoft_Access_Driver]_Too_few_parameters._Expected_1. 200 0 1419 962 70
heres my code
Code:
<body>
<%
'Declare Variables
Dim CompanyName , ContactTitle , ContactFirstName
dim ContactLastName , BillingAddress1 , BillingAddress2
dim Town , City , PostalCode
dim PhoneNumber , Extension , FaxNumber
dim EmailAddress , Notes , passdone
'obtain Values from the form
CompanyName = Request.Form("CompanyName")
ContactTitle = Request.Form("ContactTitle")
ContactFirstName = Request.Form("ContactFirstName")
ContactLastName = Request.Form("ContactLastName")
BillingAddress1 = Request.Form("BillingAddress1")
BillingAddress2 = Request.Form("BillingAddress2")
Town = Request.Form("Town")
City = Request.Form("City")
PostalCode = Request.Form("PostalCode")
PhoneNumber = Request.Form("PhoneNumber")
Extension = Request.Form("Extension")
FaxNumber = Request.Form("FaxNumber")
EmailAddress = Request.Form("EmailAddress")
Notes = Request.Form("Notes")
passdone = Request.Form("passdone")
'dbconnection
Dim objConn , objRS , strDSN
Dim strSQL , adOpenStatic , adLockReadOnly
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
' Set the ADO Constants if you are not including
' the adovbs.inc file
'Const adOpenStatic = 3
'Const adLockReadOnly = 1
strDSN = "DSN=inv"
objConn.Open strDSN
strSQL = "INSERT INTO tblpassenger ([CompanyName],[ContactTitle],[ContactFirstName],[ContactLastName],[BillingAddress1],[BillingAddress2],[Town],[City],[PostalCode],[PhoneNumber],[Extension],[FaxNumber],[EmailAddress],[Notes])VALUES("&CompanyName&",'"&ContactTitle&"','"&ContactFirstName&"','"&ContactLastName&"','"&BillingAddress1&"','"&BillingAddress2&"','"&Town&"','"&City&"','"&PostalCode&"','"&PhoneNumber&"','"&Extension&"','"&FaxNumber&"','"&EmailAddress&"','"&Notes&"')"
objRS.Open strSQL, objConn
' Close Recordset and connection
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
plaese help
thanks hemal