Java研修の一環で名刺管理システムを開発しています。
DAOパターンを使ってDBに情報を残すために、プログラムの生成をしています。
DAOのパッケージ内でinsert into でカラムを複数追加しているのですがエラーが出てしまいます。
String sql = "insert into card_data (card_id, company_name, company_name_kana, business_unit, division, section, last_name, last_name_kana, first_name, first_name_kana, email, address_number, address, tel_direct, tel_main, fax, url, corp_note, create_date, modify_date, delete_flag) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
*エラー部分
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' at line 1
?とカラムの数は一致していますし、構文も問題ないと思うのですがエラーが出てしまっています。
エラーを解消するためにお力を貸して頂ければと思いますので宜しくお願い致します。
初心者ですので情報が足りてなく、言葉足らずな部分もたくさんあると思いますので
遠慮なく申しつけて頂ける幸いです。
*環境 eclipse4.5 All in one
windows7
回答4件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/11/09 06:35
2015/11/09 06:44
2015/11/09 06:48
2015/11/09 07:09