Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Error

Status
Not open for further replies.

larryman

Programmer
Jun 16, 2000
63
0
0
US
Hi,

Please what's wrong with this Update statement

strSQL = "UPDATE Airbooking SET Head_Approve = 'Approved', Head_Approval_Date = ' # Date() # '" & _
"WHERE ID IN (" & strDeleteList & ")"

dcnDB.Execute(strSQL)

Keep getting this error

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

I did a response.Write strSQL and got this

UPDATE Airbooking SET Head_Approve = Approved WHERE ID IN (510, 511) .

Don't know the possible cause of the problem.


Oysterbar ride to success. Keep Riding
 
Using acess database you will need #datehere# or 'datehere' depends on if you use ODBC('') driver or OLEDB(##)

But in your case you wont need any of them if you gonna use Acess only functions and not ASP.
Date() function in acess should return a formated string so you wont need '' or ## to add a date, but if you use Date() from ASP it's diferent
Code:
Acess function
strSQL = "UPDATE Airbooking SET Head_Approve = 'Approved', Head_Approval_Date = Date()" & _
"WHERE ID IN (" & strDeleteList & ")"

Asp function
strSQL = "UPDATE Airbooking SET Head_Approve = 'Approved', Head_Approval_Date = '"&Date()&"'" & _
"WHERE ID IN (" & strDeleteList & ")"

dont forgetn if the '"&Date()&"' wont work use #"&Date()&"#
if Microsoft.Jet.OleDb.4.0 should be ## if Driver=Microsoft Acess Database (*.mdb) should be ''



________
George, M
 
Thanks Man,

I observed some changes in the Response.Write strSQL, and it's this

UPDATE Airbooking SET Head_Approve = 'Approved', Head_Approval_Date = '9/18/03'WHERE ID IN (510, 511)
Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.



Oysterbar ride to success. Keep Riding
 
UPDATE Airbooking SET Head_Approve = 'Approved', Head_Approval_Date = '9/18/03'WHERE ID IN (510, 511)

must be

UPDATE Airbooking SET Head_Approve = 'Approved', Head_Approval_Date = '9/18/03' WHERE ID IN (510, 511)

note the space between WHERE and '9/18/03'...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top