hai frnds,
my Table (named as Services) in Ms -Access database contains Following fields...
[code]
num ----------"AUTONUMBER"
name---------"Text"
date----------"Date/Time"[/code]
And
I am inserting data into this table.........
I am Taking name value from an html input page and my jsp page for processing this.......
[code]try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:trail");
try
{
String str1=request.getParameter("name");
String str="insert into services values('',?,******);//How To INSERT DATE HERE
PreparedStatement stmt=conn.prepareStatement(str);
stmt.setString(1,str1);
stmt.executeUpdate();
out.print("Succesfully Inserted");
conn.close();
}
catch(SQLException e)
{
out.print("SQL Not Executing");
}
}
catch(Exception e)
{
e.printStackTrace();
}
[/code]
Now I want to Insert Date into my Table "services ".........my date format should be like this dd-mmm-yyyy What are necessary changes i have to make in InputMask or format field of date(Date/time) in Ms-Access and the code i have to use in Jsp Page to get date....
And in my insert Statement firsld field is of Autonumber ,wat are problems with this during inserting....and after inserting one row i wat to retieve autonumber value ..
Any help would be greatly appreciated ....many thanks in advance
Comments
http://forums.sun.com/thread.jspa?threadID=5372982
"insert into Services(name, [date]) values(name,FormatdateTime('#yyyy-mm-dd#',strtodate(rDate)+')), rDate is the date."
Hope it hopes
Regards
[link=http://www.raqsoft.com/]RAQ Report---Enjoy Products and Services of RAQSOFT [/link]
"insert into Services(name, [date]) values(name,FormatdateTime('#yyyy-mm-dd#',strtodate(rDate)+')), rDate is the date."
Hope it hopes
Regards
[link=http://www.raqsoft.com/]RAQ Report---Enjoy Products and Services of RAQSOFT [/link]