我想vb中ado 与acess连接
谁能给讲一些比较容易入门的代码,我先谢了
[解决办法]
private sub cmd1_click()
dim conn as new adodb.connection
dim rs as new adodb.recordset
dim str as string
dim intdb as integer
conn.connectionString = "provider=Microsoft.jet.oledb.4.0;Data Source=d:\database\M.mdb;Mod=readwrite|Share Deny None;Persist Security Info=False "
conn.open
str= "select max(speed) as speed from TableG "
rs.open str,conn,adopenkeyset,adlockreadonly
if rs.recordcount> 0 then
intdb=rs!speed
lblT.caption=intdb/4
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
end sub