以下语句可以创建Statement接口对象的是( ) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); (注:conn为数据连接对象) C: Statement sm = conn. getStatement ();(注:conn为数据连接对象) D: Statement sm = conn. prepareStatement ();(注:conn为数据连接对象)
以下语句可以创建Statement接口对象的是( ) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); (注:conn为数据连接对象) C: Statement sm = conn. getStatement ();(注:conn为数据连接对象) D: Statement sm = conn. prepareStatement ();(注:conn为数据连接对象)
建立一个Connection对象的正确方法是( )。 A: Dim conn As ADODB.Connection conn=ADODB.Connection B: Dim conn As ADODB.Connection Set conn=New ADODB.Connection C: Dim conn As ADODB.Connection Set conn=ADODB.Connection D: Dim conn As Connection Set conn=New Connection
建立一个Connection对象的正确方法是( )。 A: Dim conn As ADODB.Connection conn=ADODB.Connection B: Dim conn As ADODB.Connection Set conn=New ADODB.Connection C: Dim conn As ADODB.Connection Set conn=ADODB.Connection D: Dim conn As Connection Set conn=New Connection
建立一个Connection对象的正确方法是( )。 A: Dim conn As ADODB.Connection<br>conn=ADODB.Connection B: Dim conn As ADODB.Connection<br>Set conn=New ADODB.Connection C: Dim conn As ADODB.Connection<br>Set conn=ADODB.Connection D: Dim conn As Connection<br>Set conn=New Connection
建立一个Connection对象的正确方法是( )。 A: Dim conn As ADODB.Connection<br>conn=ADODB.Connection B: Dim conn As ADODB.Connection<br>Set conn=New ADODB.Connection C: Dim conn As ADODB.Connection<br>Set conn=ADODB.Connection D: Dim conn As Connection<br>Set conn=New Connection
假定数据库已经正确建立连接conn,下述代码实现删除一条记录的功能,将代码补充完整。[br][/br] String sql = "delete from users_info where id=?"; 【1】 ps = conn.prepareStatement(sql);[br][/br] ps.setInt(1, id); ps.【2】 ;
假定数据库已经正确建立连接conn,下述代码实现删除一条记录的功能,将代码补充完整。[br][/br] String sql = "delete from users_info where id=?"; 【1】 ps = conn.prepareStatement(sql);[br][/br] ps.setInt(1, id); ps.【2】 ;
以下语句可以创建Statement接口对象的是( )(注:conn为数据连接对象) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); C: Statement sm = conn. getStatement (); D: Statement sm = conn. prepareStatement ();
以下语句可以创建Statement接口对象的是( )(注:conn为数据连接对象) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); C: Statement sm = conn. getStatement (); D: Statement sm = conn. prepareStatement ();
假定已经获得一个数据库连接,使用变量conn来表示。下列语句中能够正确获得结果集的有__1__。(选择两项)[br][/br] A.Statement stmt = conn.createStatement()__2__;[br][/br] ResultSet rs = stmt.executeQuery(“SELECT * FROM STUDENT”);[br][/br] B.Statement stmt = conn.createStatement(“SELECT * FROM STUDENT”);[br][/br] ResultSet rs = stmt.executeQuery()__3__;[br][/br] C.PreparedStatement stmt = conn.prepareStatement()__4__;[br][/br] ResultSet rs = stmt.executeQuery(“SELECT * FROM STUDENT”);[br][/br] D.PreparedStatement stmt = conn.prepareStatement(“SELECT * FROM STUDENT”);[br][/br] ResultSet rs = stmt.executeQuery()__5__;
假定已经获得一个数据库连接,使用变量conn来表示。下列语句中能够正确获得结果集的有__1__。(选择两项)[br][/br] A.Statement stmt = conn.createStatement()__2__;[br][/br] ResultSet rs = stmt.executeQuery(“SELECT * FROM STUDENT”);[br][/br] B.Statement stmt = conn.createStatement(“SELECT * FROM STUDENT”);[br][/br] ResultSet rs = stmt.executeQuery()__3__;[br][/br] C.PreparedStatement stmt = conn.prepareStatement()__4__;[br][/br] ResultSet rs = stmt.executeQuery(“SELECT * FROM STUDENT”);[br][/br] D.PreparedStatement stmt = conn.prepareStatement(“SELECT * FROM STUDENT”);[br][/br] ResultSet rs = stmt.executeQuery()__5__;
JDBC共有四类驱动程序:connection、statement、preparestatement、resultSet。()
JDBC共有四类驱动程序:connection、statement、preparestatement、resultSet。()
下面有关Statement和PrepareStatement的描述,错误的是()
下面有关Statement和PrepareStatement的描述,错误的是()
如果SqlConnection对象为conn,SqlCommand对象为cmd,请写出将cmd的连接属性设置为conn的代码:______
如果SqlConnection对象为conn,SqlCommand对象为cmd,请写出将cmd的连接属性设置为conn的代码:______
连接对象的创建方法中,正确的是()。 A: Conn=CreateObjet(“ADODConnection”) B: Conn=Server.CreateObjet(“ADODConnection”) C: SetConn=Server.CreateObjet(“ADODConnection”) D: SetConn=Server.CreateObjet(ADODConnection)
连接对象的创建方法中,正确的是()。 A: Conn=CreateObjet(“ADODConnection”) B: Conn=Server.CreateObjet(“ADODConnection”) C: SetConn=Server.CreateObjet(“ADODConnection”) D: SetConn=Server.CreateObjet(ADODConnection)