prepareStatement有什么用? [英] What is the use of prepareStatement?
本文介绍了prepareStatement有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i编写了jsp用于检索Javascript的responseText,但是它会抛出错误
ERROR
展开 | 选择 | Wrap | 行号
解决方案
不确定我知道这里的问题是什么。如果它是关于prepareStatement的,那么它只用于准备一个用于数据库连接的SQL语句。基本上,读取您看到的连接的代码,您知道要运行的SQL,因此您使用连接为SQL准备SQL,该对象包含一个可以执行以返回resultSet的查询。
如果您有关于将String转换为int的问题,那么您需要使用parseInt函数,例如:
展开 | 选择 | 换行 | 行号
嗨Nathj感谢您的回复..,
现在我没有错误,但它显示一个空白的窗口
它没有进入while(rs.next){请帮帮我
JavaScript代码
展开 | / span> 选择 | 换行 | 行号
尝试这样的事情:
展开 | 选择 | Wrap | 行号
Hi,
i have written jsp for retrieving the responseText for Javascript but it throw error as
ERROR
Expand|Select|Wrap|Line Numbers解决方案Not sure I know what the question is here. If it is about prepareStatement this is used to do just that it prepares a SQL statement for use with your database connection. Basically, reading the code you see that you have a connection, you know the SQL you want to run so you prepare the SQL with the connection giving you a Statement object that contains a query which you can execute to return a resultSet.
If you have a question about converting String to int then you need to use the parseInt function something like:
Expand|Select|Wrap|Line Numbers
Hi Nathj thanks for ur reply..,
now i''m getting no error,but it display a blank window
it is not entering into while(rs.next){ please help me
JavaScript Code
Expand|Select|Wrap|Line Numbers
Hi,
Try something like this:
Expand|Select|Wrap|Line Numbers
这篇关于prepareStatement有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆