Problem In Inserting The Value In The Database
Hi i am developing the android application. I am using sql server 2008 R2 database to store the data and retrieve the data. Now when i am inserting the value in the database i am i
Solution 1:
Ok, let's do this.
First, and most important of all, your code is vulnerable to SQL Injection. You should work on that and start using parameters.
Second, by the time you start using parameters, your error will most likely disappear (or reappear somewhere else, this time clearer on what's wrong). That's because, probably, the server "doesn't like" your stringly typed date format, so it fails.
Update
About parameterized queries in java, read here:
Solution 2:
I would guess there's a date format mismatch.
Try looking here: http://www.coderanch.com/t/385771/java/java/java-sql-Date-dd-mm
Post a Comment for "Problem In Inserting The Value In The Database"