vb编写一程序可以读取access文件并创建一个表,将读取到的内容存储进去

如题,实现以上功能。vb没接触过,电脑上数据库也没装,希望回答可以详细点。

呃 LZ不要盯着 access 你的研究方向错误了

先去研究一下 简单入门的SQL语句

create相关

•show database; 显示出现有的数据库
•use database_x; 现在要使用数据库database_x
•create table coffee (id int(5) not null,coffee_name varchar(25)); 创建一张表,包含id和coffee_name两个字段
•alter table coffee add taste varchar(10); 增加新的一列
•insert into coffee (id,coffee_name,taste,rank) value ("1","BlueMountain",“well”,“5”); 插入数据
•show columns from coffee; 查看表结构
•show create table coffee; 查看表信息,包括建表语句
•alter table student rename ss; 改变表名
•alter table ss drop mark; 删除表ss中mark列
select语句

•select * from coffee where id="1"; 查询出id=1的所有信息
•select coffee_name from coffee where id="2"; 查询出id=2的coffee name
•select * from club where id between "1" and "3"; 查询出id=1到3的条目
•select * from club where id="1" or id="3"; 查询出id=1和id=3这两个条目
•select club_name from club where mark>50; 查询出mark大于50的club
•select club_name from club where mark not between 48 and 50; 查询mark不在48与50之间的club
•select * from club where id in("1","3","4"); 查询id=1,3,4的条目
•select * from club where id not in("1","3","4");
•select * from club where name like "M%r"; 通配符%表示任意长度的字符(可以是0,汉字为两个字符)
•select * from club where name like "M_r"; _表示单个字符
•select * from club where id in("1","3","4") and mark>50; 多重查询
•select * from club order by mark desc; 按照mark降序排列(desc:降序,usc:升序)
数量查询相关

•select count(*) from club; 查询club中有多少条记录
•select count(distinct mark) from club; 不同分数的有多少条记录
•select sum(mark) from club; 积分总和
•select avg(mark) from club; 平均积分
•select max(mark) from club; 最高积分
•select min(mark) from club; 最低积分
update语句

•update club set mark=mark-8 where id="1"; id=1的俱乐部积分罚8分
delete语句

•delete from club where id="001"; 删除id=001的俱乐部信息
以上语句都是SQL语句增删改查最基本的部分,属于入门级别,一定要掌握。

详细出处参考:http://www.jb51.net/article/34285.htm追问

sql的语言我懂点,不懂的我也搜的到。。。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-02-18
啥都不会?
那有了这个程序,你能做什么?追问

我想说我提问了只是想先有个参考的模板,我没学过当然什么都不懂

第2个回答  2014-02-18
问题描述不清楚,是在Access中原来有一个表,首先读取这个表的内容,然后再创建另外一个表,将读取的数据存储到这个新建的数据表中吗?追问

这个access文件考勤软件是生成的数据库文件a.mdb,然后想用vb编个程序读取实现读取这个文件,再将读取到的数据以表的形式在编的软件上陈列出来。

追答

比较简单,你的数据库文件给我,我帮你做。

追问

不会传,你就弄个简单点的access文件不就可以了么,我只是想参考下。

相似回答