当前位置:编程学习 > VB >>

请问怎么用vb语言 就出数据库中表里提出的最大id值

多谢拉!! --------------------编程问答-------------------- dim t as new adodb.recordset
dim s as string
dim cnn as new adodb.Connection
cnn.ConnectionString = "...<自己填>"

s = "Select Max(ID) as maxID From table"
set t = cnn.Execute(s) --------------------编程问答-------------------- 楼上的补充一下:
Set t = cnn.Execute(s)
应该改为
Set t = cnn.Execute(s)(0) --------------------编程问答-------------------- 直接写SQL就是、 --------------------编程问答-------------------- 这个简单啊,网上搜一下就得到答案了.
补充:VB ,  数据库(包含打印,安装,报表)
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,