test2.java

来自「创建中间企业对象层」· Java 代码 · 共 56 行

JAVA
56
字号
/**
 ************************************************************
 * The VML Report
 *
 *
 *
 ************************************************************
 * @author duke
 * @version 1.2
 * @date 2004-8-10 14:37
 */
 
package com.kyle.eobject;

import java.io.*;
import java.sql.*;
import net.snapbug.util.dbtool.*;

public class Test2
{
	public Test2() throws Exception
	{

	}
	
	public String go() throws Exception
	{
		try
		{
			ConnectionManager.init( "D:/DatabasePool.conf" );
			ConnectionManager.debug( false );
            ConnectionPool pool = ConnectionManager.getConnectionPool( "testSQLServer" );

            Statement st = pool.createStatement();
            st.executeQuery("select * from loc");
            st.close();
            
            return "okk";
        }

        catch (Exception e)
        {
            System.out.println(e.getMessage());
            return "no okk";
        }
	}
	

	public static void main(String args[]) throws Exception
	{
		System.out.println("sss");
		Test2 t = new Test2();
		System.out.println(t.go());

	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?