浪迹天涯
web报表设计器....
posts - 61,comments - 71,trackbacks - 0
            public boolean Check_DataBase_IsOpen(String fwqIP,String user,String password) {
              boolean m_boo = true;
              String url =  "jdbc:jtds:sqlserver:"+"//"+fwqIP+":1433;DatabaseName=master;lastupdatecount=true;SelectMethod=cursor";
              com.paiao.app.db.DbBase dbbase  =  com.paiao.app.db.DbBase.getInstance();
              Connection con = this.con(url,user,password);
              PreparedStatement pstm = null;
              String sqls1 = "create database shebei_paiao ";
              //String sqls1 = "select * from syscolumns ";
              try {
                pstm = con.prepareStatement(sqls1);
                pstm.execute();
                m_boo = true;
              }
              catch (Exception e) {
                m_boo = false;
                System.out.println("您的mssqlserver数据库没有启动!");
              }
              finally {
                dbbase.Release(pstm, con);
              }
              return m_boo;
            }
posted on 2007-03-25 00:46 JJCEA 阅读(277) 评论(0)  编辑  收藏 所属分类: 学习日记

只有注册用户登录后才能发表评论。


网站导航: