|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
form submit data into database.
I've tried to submit details of a form from an HTML page, and I get this error each time.
SQLException caught: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'org.apache.catalina.util.Enumerator@739b3a'. do you know what is wrong, please help!! this is the portion of the code....... Enumeration e = request.getParameterNames(); while( e.hasMoreElements() ) { String strName = (String) e.nextElement() ; String[] strValue = request.getParameterValues( strName ); out.println(strName + " = "); if (strValue.length == 1) { String strValues = strValue[0]; if (strValues.length() == 0) out.print("<I>No Value</I>" + "<br>"); else out.print(strValues + "<br>"); } } Conn = DriverManager.getConnection("jdbc dbc:myDatabase");Statement stmt = Conn.createStatement(); String query = "INSERT INTO userDetails VALUES ( " + e + ");"; stmt.executeUpdate(query); stmt.close(); Conn.close();; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > form submit data into database. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|