cn.Open strCn
strSQL = "Select 表名.姓名,表名.性别 from 表名 where 表名.条件列名=条件"
rs.Open strSQL, cn, 1, 3
Sheet1.Range("A1", "Z65000").Clear
Sheet1.Range("A1").CopyFromRecordset rs
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
create database employeego
create table people(sno int(10) primary key, sname varchar(20) not null,sage int(5) not null,pno int(5) not null,ssalary int(10) not null)
go
create table department(pno int(10) primary key,pname varchar(20) not null primary key,pnumber int(10) not null,phead varchar(20) not null)
go
create table project(no int(10) primary key,name varchar(20) not null,pdepartment varchar(20) not null)
go
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)