
已解决问题
谷歌青586用户在2013.04.21提交了关于“马自达6怎么用j**a向**库中添加和删除**?”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-11-01T19:46:07。希望大家能够帮助她。详细问题描述及疑问:期待您的答案,你是我的宝贝,你是我的花,谢谢你对我的帮助!
详细问题描述及疑问:期待您的答案,你是我的宝贝,你是我的花,谢谢你对我的帮助!
importj**a.sql;
publ
Stringu
Stringpasswo
Connectioncon;
S
ResultSetrs;
Stringquery,
intid
Stringurl="jdbc:odbc:s
try
Class.f
}catch(ClassNotFoundExceptione){
System.out.println("没有找到指定
}
try
con=Driv
statement=con.createS
query="insertintoOther1(key)"+"value
//由于你的id设为primary,so不用再添加id字段
statement=exceute.Upd
query="sele
rs=statement.executeQuery(query);
whil
id=rs.getI
key=rs.getStr
System.out.println("id:"+id);
Syst
}
}
catch(
System.out.
e.printStackTrace();//打
}
finally
try{
if(rs!
if(statement!=**ll)statement
if(con!=
}
catch(SQLE
e.printStackTrace();
}
}
}
}