package javaQQ;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.sun.org.apache.regexp.internal.recompile;
public class User_QQ {
static int j=0;
String usernameU[]=new String[this.getUnum()];
String usernameF[]=new String[this.getUnum()];
String userpasswordU[]=new String[this.getUnum()];
String friendnameF[]=new String[50];
int friendport=0;
int userport=0;
public User_QQ(){
getUname();
getUpass();
}
public int getUport(String un){
String user="sa";
String password="sa";
String url="jdbc:sqlserver://localhost:1433;DataBaseName=QQ;";
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection cn=DriverManager.getConnection(url,user,password);
String sql="select * from qqFriend where username=?";
PreparedStatement pst=cn.prepareStat
高级语言案例分析_QQ_数据库操作
最新推荐文章于 2020-09-16 08:24:23 发布