Forums Register Login

Data truncation:incorrect date value:'null' for column

+Pie Number of slices to send: Send
Hi, i have a problem when updating JDateChooser field in Mysql database
Each time i try to upadte i get this error


Kindly assist me.
+Pie Number of slices to send: Send
And what is the entry in the text field? Which field is missing? Is it the date? Which Date class are you using?
+Pie Number of slices to send: Send
Won't solve your problem, but it will make the code easier to understand and maintain.

Try using a PreparedStatement for your SQL:

+Pie Number of slices to send: Send
Thanks Rob, i used a PreparedStatement for my SQL but am getting an exception


whereas my parameters are 7.





The TextField Contract is where i have my JDateChooser
+Pie Number of slices to send: Send
 

james kinyua wrote:. . .
The TextField Contract is where i have my JDateChooser

What a dreadful name for a date chooser.

If you have 8 ?s in the prepared statement you must pass 8 data to correspond. And they must be the appropriate type. What happens with your cast to SQL date?
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3123 times.
Similar Threads
Convert a query string from one format to another
how to process the "java -verbose:class" output info in the command.
jTable connected with MySQL problem with buttons
Problem with JDBC + mysql delete query
Aliter for string formatting - Which is best approach?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:24:43.