请高手帮个忙 解决一下下面的问题:
我自己建立了一个access的数据库,但用vb实现时出现"变量不匹配"的提示
我的代码是这样的:
private sub cmd1_click()
dim strdb as string
dim intdb as integer
adodc1.connectionString ="provider=Microsoft.jet.oledb.4.0;Data Source=d:\database\M.mdb;Mod=readwrite|Share Deny None;Persist Security Info=False"
strdb="select max(speed) from TableG"
intdb=CInt(strdb)
lblT.caption=intdb/4
end sub
请帮我看看是哪里的问题,如何改正,非常感谢!
我自己建立了一个access的数据库,但用vb实现时出现"变量不匹配"的提示
我的代码是这样的:
private sub cmd1_click()
dim strdb as string
dim intdb as integer
adodc1.connectionString ="provider=Microsoft.jet.oledb.4.0;Data Source=d:\database\M.mdb;Mod=readwrite|Share Deny None;Persist Security Info=False"
strdb="select max(speed) from TableG"
intdb=CInt(strdb)
lblT.caption=intdb/4
end sub
请帮我看看是哪里的问题,如何改正,非常感谢!
解决方案 »
- 操作非本机文件
- [求救]关于WINSOCK API调用的ws2_32.dll版本问题!
- 如何在1~100的数字中随机抽取10个数字,要求不重复.
- 函数问题???
- 在vb中嵌入IE,我利用TabStrip将点击页面上的链接而出现的新开窗口,抓到webBrowser控件显示的问题
- Run-time error '3265': Item cannot be found in the collection corresponding to the requested name or ordinal.
- 在VB中声明SetSockOpt这个API函数的格式是怎样的?急!!
- 在线求注!!!
- 如何学好.net?
- 没有打印机,怎么调试打印程序,可以把打印内容输出到文件吗?
- 关于WebBrowser的问题,谢谢
- 求用VB打印发票的程序
intdb=CInt(strdb)
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