Hello,
This what you get when you submit info from your form/html page. This
looks like there is a field size problem in the database itself. The error
is, its trucating String, since you do not have binary data. Check the
'size' of your fields in SQL database. And see, if you exceeded the length
of the field in your form for any of the string. Other than that, I don't
see any syntactic error in your code.
regards,
> Hello Everybody
> I am having real problems inserting data in a database(SQL Server7.0)
t> hrough a servlet(Registeration form).It is supposedto take the
parameters
a> nd when submit is click it should insert it into database.I dont know
w> hat i am doing wrong here.I am really new to servlet technology can
a> nybody please
h> elp This is the error I am having in tomcat 4.0:
> (java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]
S> tring or binary data would be truncated.
> at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
> at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
> at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:2525)
> at sun.jdbc.odbc.JdbcOdbcStatement.execute
(> JdbcOdbcStatement.java:337)
> at Register.insertIntoDB(Register.java:71)
> at Register.doPost(Register.java:53)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(> ApplicationFilterChain.java:247)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
(> ApplicationFilterChain.java:193)
> at