大家好:
请问一个问题:在java中连接数据库中stored procedure的问题
我的问题是:cstmt=con.prepareCall("{call dt_haha() }");
System.out.println("ok");
try
{
cstmt.executeUpdate();
//or con=cstmt.executeQuery();}
catch(SQLException e)
{
while(e!=null)
{
System.out.println("SQLState"+e.getSQLState());
System.out.println("Message"+e.getMessage());
System.out.println("Vendor"+e.getErrorCode());
e=e.getNextException();
}
}可是连接不上存储过程!总是出错!(我的stored procedure 中只有一条insert语句
没有掺数。
========================
这是例外的情况
SQLState37000
Message[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure dt_haha has no parameters and arguments were supplied.
Vendor8146
请问一个问题:在java中连接数据库中stored procedure的问题
我的问题是:cstmt=con.prepareCall("{call dt_haha() }");
System.out.println("ok");
try
{
cstmt.executeUpdate();
//or con=cstmt.executeQuery();}
catch(SQLException e)
{
while(e!=null)
{
System.out.println("SQLState"+e.getSQLState());
System.out.println("Message"+e.getMessage());
System.out.println("Vendor"+e.getErrorCode());
e=e.getNextException();
}
}可是连接不上存储过程!总是出错!(我的stored procedure 中只有一条insert语句
没有掺数。
========================
这是例外的情况
SQLState37000
Message[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure dt_haha has no parameters and arguments were supplied.
Vendor8146
解决方案 »
- 请问jad允许的编码方式是什么?可以是GB2312吗?
- 怎样能学好JAVA?为什么我感觉学起来那么费劲呢?好像很多人接受起来都很快的 。
- 急救~~~~~怎么用url类实现访问带session的两个页面?????????
- JTree 的90度旋转显示
- 急!如何解决jcreator3.0中的中文显示乱码问题?
- 写一个SQL语句,在线等,大伙帮帮忙!
- 新手对于用正则表达式给数字每三位加逗号的疑问
- 为什么在jb7中建立的web_app,有的jsp能编译而有些不能编译,请教
- 简单问题,当三分拉!
- 我用jdbc访问Access数据库的时候,碰上个奇怪的现象
- jbulder7中添加数据的问题
- j2se, jre 支持Com,DCOM吗?
1,你首先确定存储过程能够执行
2,你确定能够连通数据库
3,你确定java通过callstatedment能够调用存储过程
你一步一步试!