文档介绍:×÷Õߣºzergling
email: onlydream@
ÈÕÆÚ£º7/27/2001 1:15:48 PM
---------------------------------------------
package bbs;
/*
database operation class, test by odbc
This javabean is written by zergling
It is my first javabean :o
version
*/
import .*;
import .*;
import .*;
import .*;
import .*;
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()
{
//("");
= "jdbc:odbc:jspbbs"; //replace with your default database
try
{
("");
= (,"sa",""); //replace with your default database connection configure option
= true;
return true;
}
catch(Exception e)
{
= false;
return false;
}
}
//connect to the custom database
public boolean connect(String conName,String username,String password)
{
//("");
= conName;
try
{
("");
= (,username,password);
= true;
retu