java


Netbeans - Error when trying to input Date and RadioButtons


public void input(){
java.sql.Connection conn = new koneksi.koneksi().connect();
try{
String sql = "insert into login "
+ "(nama,pass,kelamin,tempat_lahir,tanggal_lahir,jalan,kota,provinsi,negara,kode_pos,email,telepon) "
+ "values(?,?,?,?,?,?,?,?,?,?,?,?)";
java.sql.PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1, nama.getText());
stmt.setString(2, pass.getText());
stmt.setString(3, kelamin.getSelection().toString());
stmt.setString(4, tempat_lahir.getText());
stmt.setString(5, tanggal_lahir.getDate().toString());
stmt.setString(6, jalan.getText());
stmt.setString(7, kota.getText());
stmt.setString(8, provinsi.getText());
stmt.setString(9, negara.getText());
stmt.setString(10, kode_pos.getText());
stmt.setString(11, email.getText());
stmt.setString(12, telepon.getText());
stmt.executeUpdate();
JOptionPane.showMessageDialog(null, "Input Success ");
}catch(SQLException ex){
JOptionPane.showMessageDialog(null, "Input Failed");
}
}
it can't get into my database, and the stacktrace still fine
this is what my sql server look like (Click this to see pic)
this is what my design/project looks like (Click this to see pic)
okay, i take some problem core
stmt.setString(5, tanggal_lahir.getDate().toString());
or
stmt.setString(5, tanggal_lahir.getCalendar().toString());
which one i should use to?
i using jcalendar-1.4.jar in my library and added jcalendar swing to my panel

Related Links

Fastest most efficient way to determine decimal value is integer in Java
Is there a way to read the jvmRoute value from the JBoss server.xml at runtime?
Calling a Java class from Adobe Air app
Java: clone() and equality checks
Java Web Start: How to write files to windows UNC Path?
Unit testing icefaces
MathML and Java [closed]
Sending an Email Using Java
can't find file… using eclipse and file/filereader/bufferedreader
Liferay: When to go for multiple war files
Best way for live RTMP streaming from dv camcorder
How does JVM deal with duplicate JARs of different versions
Find max value in Java with a predefined comparator
Can you save groups of tabs in Eclipse so you can open them later?
Manage Session when broswer has disable cookies
Overriding the JSP servlet (filter “*.jsp”) to wrap in an authentication model

Categories

HOME
wso2-am
smarty
cplex
youtube-dl
packages
binary-tree
ip
webpack-2
ravendb
multiple-records
esper
add
cloudkit
adobe-analytics
here-api
postgres-xl
gz
hex-editors
designer
ef-migrations
angular-ui
nhibernate-envers
scriptcs
facebook-instant-articles
crosstab
java-7
android-widget
numerical-methods
vlsi
centos6.5
chromebook
jspm
kendo-datasource
lightswitch-2013
tinymce-4
socialengine
commit
uiswipegesturerecognizer
normal-distribution
revolution-slider
appfabric
code-search-engine
xenforo
az-application-insights
ansible-playbook
lumberjack
ncalc
google-closure
nxlog
gpx
taffy
react-scripts
python-webbrowser
ionicons
boost-preprocessor
dynamics-sl
migradoc
pintos
abcpdf9
visual-c++-2008
url-masking
qpid
jwplayer7
whois
nessus
php-internals
itextpdf
system.management
photobucket
srand
android-listview
microbenchmark
operation
fluid-dynamics
cisco-ios
clipperlib
block-device
c3
googlemock
comexception
concurrent-collections
commoncrypto
android-screen-support
sabredav
lcs
pvrtc
trusted
mt
broken-links
venn-diagram
dsn
zpt
servicehost
pyinotify
digest-authentication
dmx512
revisions
backcolor
ti-dsp
boost-smart-ptr
phonon
lzh

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App