寻求 连接ACCess数据库 的 vb.net程序?简单一点的查询就可以,!

来源:百度知道 编辑:UC知道 时间:2024/05/14 13:23:53
我是新手,积分也不多,哪位好心的大姐大哥帮一下?积分尽量多给

imports system.data
imports system.data.oledb
pirivate sub button1_click(....)
dim myconnection as new oledbconnection("provider=microsoft.jet.oledb.4.0;data source=数据库位置")
dim mycommand as oledncommand
dim mydatareader as oledbdatareader
myconnection.open()
mycommand=new oledbcommand("select * from 表",myconnection)
mydatareader=mycommand.executereader()
相关操作(比如显示数据)
mydatareader.close()
myconnection.close()
end sub