建立一个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
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
- 以下连接对象的创建方法,正确的是()。 A: conn=CreateObject(”ADOD B: connection”) C: conn=Server.CreateObject(”ADOD D: connection”) E: Setconn=Server.CreateObject(ADOD F: connection) G: Setconn=Server.CreateObject(”ADOD H: connection”)
- 在Java Web应用程序中,下列()选项中的代码能够正确实现使用数据源(DataSource)获取数据库连接对象(数据源名称为dsname)。 A: A DataSource soure = new DataSource( ) ; Connection conn = source.getConnection( ); B: B Context source = new InitalContext( ); Connection conn = source.getConnection( ); C: C Context ctx = new InitalContext( ); DataSource ds = (DataSource) ctx.lookup("java:comp/env/dsname"); Connection conn =ds.getConnection( ); D: D Context ctx = new InitalContext ( ); DataSource ds = (DataSource) ctx.lookup("dsname"); Connection conn = ds.getConnection( );
- 案例分析题对SQL Server数据库进行操作,数据库名为:TestDB,用户名为sa,密码为xyz123,数据库服务器名为ACT或211.153.165.7,创建的数据源为TEST,下列语句已创建Connection对象 Set conn = Server.CreateObject("ADODB.Connection") 请按下列要求填空: 以数据源方式指定conn对象的连接字符串 conn.ConnectionString =()
- 现在已经有一个Connection类的对象conn,建立一个Statement对象stat的语句是:__________________。