最新下载
热门教程
- 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
相关文章
- 阴阳师SSR孔雀明王强度介绍 05-20
- 明日方舟CW 05-20
- bitkeep官网下载app 05-20
- Ordi币安卓版官方登录版 05-20
- 《金铲铲之战》怒翼龙阵容装备搭配 05-20
- 欧易trust钱包安卓版2024 05-20