質問編集履歴

2

タイトルの変更

2015/07/07 07:43

投稿

R.lawliet
R.lawliet

スコア41

test CHANGED
@@ -1 +1 @@
1
- データベースに「'」を用いずに日付をInsertって出来ますか?
1
+ java:PreparedStatementで「'」を用いずに日付をString型でInsertって出来ますか?
test CHANGED
File without changes

1

変数の中身を入力

2015/07/07 07:43

投稿

R.lawliet
R.lawliet

スコア41

test CHANGED
File without changes
test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  //プリペアードステートメントオブジェクトの生成
28
28
 
29
- PreparedStatement ps = con.prepareStatement(INSERT_QUERY);
29
+ PreparedStatement ps = con.prepareStatement(INSERT INTO BIRTHDAY_TABLE values(?););
30
30
 
31
31
  ps.setString(1,"'"+bean.getBirthday()+"'");
32
32