pwinters
Programmer
- Sep 12, 2002
- 34
I'm using MS Access 97 db with SQL & Java web front-end.
I figured out how to convert the date to a readable format when I display it on the page, but I can't figure out how to get the date formatted to update the table.
Here's my code...
String sql=
"UPDATE " +
"Tables_Status" +
" SET Tables_Status.TBL_LOE=" + tloe +
", Tables_Status.TBL_DD_TD= Format('tddtd', 'MM/DD/YYYY')" +
", ....
Currently, when I run this code I am getting an error of Too Few Parameters. Expected 1.
But, I think there's more to it than that.
Oh, tddtd is a String that I'm getting from the previous page when the user enters the date in this field (10/02/2002).
String tddtd = request.getParameter("tblddtd"
;
Also, when I take out the Format function, the date is stored as 12/30/1899.
Please help me figure this out...it's driving me nuts!
Thanks
I figured out how to convert the date to a readable format when I display it on the page, but I can't figure out how to get the date formatted to update the table.
Here's my code...
String sql=
"UPDATE " +
"Tables_Status" +
" SET Tables_Status.TBL_LOE=" + tloe +
", Tables_Status.TBL_DD_TD= Format('tddtd', 'MM/DD/YYYY')" +
", ....
Currently, when I run this code I am getting an error of Too Few Parameters. Expected 1.
But, I think there's more to it than that.
Oh, tddtd is a String that I'm getting from the previous page when the user enters the date in this field (10/02/2002).
String tddtd = request.getParameter("tblddtd"
Also, when I take out the Format function, the date is stored as 12/30/1899.
Please help me figure this out...it's driving me nuts!
Thanks