最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
果果来看(一个封装了基本JDBC操作的类)
时间:2022-11-14 23:26:39 编辑:袖梨 来源:一聚教程网
odbc.java
---------------------------------------------
package bbs;
/*
database operation class, test by odbc
This javabean is written by zergling
It is my first javabean :o
version 1.01
*/
import java.sql.*;
import java.lang.*;
import java.io.*;
import java.util.*;
import sun.io.*;
public class odbc
{
Connection sqlCon;
ResultSet rstSql;
Statement stmS;
String strCon;
String strSql;
boolean status;
long rowcount;
int page;
int pagesize;
long pagecount;
long firstrecord;
//connect to the default database
public boolean connect()
{
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
this.strCon = "jdbc:odbc:jspbbs"; //replace with your default database
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
this.sqlCon = java.sql.DriverManager.getConnection(this.strCon,"sa",""); //replace with your default database connection configure option
---------------------------------------------
package bbs;
/*
database operation class, test by odbc
This javabean is written by zergling
It is my first javabean :o
version 1.01
*/
import java.sql.*;
import java.lang.*;
import java.io.*;
import java.util.*;
import sun.io.*;
public class odbc
{
Connection sqlCon;
ResultSet rstSql;
Statement stmS;
String strCon;
String strSql;
boolean status;
long rowcount;
int page;
int pagesize;
long pagecount;
long firstrecord;
//connect to the default database
public boolean connect()
{
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
this.strCon = "jdbc:odbc:jspbbs"; //replace with your default database
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
this.sqlCon = java.sql.DriverManager.getConnection(this.strCon,"sa",""); //replace with your default database connection configure option
相关文章
- 《潜行者2:切尔诺贝利之心》使用手电筒方法介绍 11-21
- 《潜行者2:切尔诺贝利之心》回声探测器使用攻略分享 11-21
- 《潜行者2:切尔诺贝利之心》人工制品奖励获得方法介绍 11-21
- 《潜行者2:切尔诺贝利之心》奇美拉嵌合体打法技巧分享 11-21
- 《潜行者2:切尔诺贝利之心》风衣怪打法技巧分享 11-21
- 《潜行者2:切尔诺贝利之心》变异狗打法技巧分享 11-21