prepareStatement ()
package conn.db;
import java.sql.*;
/**
....
....
Connection conn=null;
...
...
public void executeInsert(String sql)
{
try
{
conn=DriverManager.getConnection(sConnStr);
PreparedStatement stmt=conn.prepareStatement();
......
代码如上 运行结果下:
cannot resolve symbolsymbol : method prepareStatement ()
location: interface java.sql.Connection
PreparedStatement stmt=conn.prepareStatement();
^
1 error
各位大佬 这个方法还有救吗? 小弟用的是SQL server
------解决方案--------------------PreparedStatement stmt=conn.prepareStatement(sql);