java使用PreparedStatement连接数据库问题求解
qt.李 2020-03-06 11:27:18 我在执行查询语句:
sql="select top 1 batchno from proscjhb where procwip>0 and batchno= ? and techno = '57'"
然后:
pstm.setObject(1,"S9R001");
rs = pstm.executeQuery();
System.out.println(pstm.toString());
打印出的sql语句还是
select top 1 batchno from proscjhb where procwip>0 and batchno= ? and techno = '57'
参数没有添加进去?没有起到作用?
求大神解答!我用的是Sqlserver数据库。连接数据库是没有问题的,SQL执行也没有问题.