Dim selectid As String
Dim selectid1 As Long
Dim selectid2 As Long
selectid = Combo1.text
selectid1 = Split(selectid, "-")(0)
selectid2 = Split(selectid, "-")(1)
Dim ID_Rs As ADODB.Recordset
SQL = "select id,uid,content,dd,title,rs,dc,ishead,dirhead,isgbook,issign,auid,cword,dy_type,trackback,comments,filetp,isubb,isphone from diary where id between selectid1 and selectid2 and uid='" & uId & "' and islocked is null"
SQL = "execute user_diary_tag '" & Replace(SQL, "'", "''") & "'"
Set ID_Rs = Conn.Execute(SQL)
combo1是个复合框,包含的值为1-499999,500000-699999,我采用类型转换,再通过split函数获取“-”前后的值,然后传给SQL语句查询,取的值是对的,但是程序运行的话提示错误:提示selectid1无效,这是怎么回事啊?
Dim selectid1 As Long
Dim selectid2 As Long
selectid = Combo1.text
selectid1 = Split(selectid, "-")(0)
selectid2 = Split(selectid, "-")(1)
Dim ID_Rs As ADODB.Recordset
SQL = "select id,uid,content,dd,title,rs,dc,ishead,dirhead,isgbook,issign,auid,cword,dy_type,trackback,comments,filetp,isubb,isphone from diary where id between selectid1 and selectid2 and uid='" & uId & "' and islocked is null"
SQL = "execute user_diary_tag '" & Replace(SQL, "'", "''") & "'"
Set ID_Rs = Conn.Execute(SQL)
combo1是个复合框,包含的值为1-499999,500000-699999,我采用类型转换,再通过split函数获取“-”前后的值,然后传给SQL语句查询,取的值是对的,但是程序运行的话提示错误:提示selectid1无效,这是怎么回事啊?
解决方案 »
- 请怎么样把指定内容填入网页表格呢?
- 用DataEnvironment+datareport打印Access中最后一条记录,有时候会打印出倒数第二条记录,这是为什么?
- 怎样把本机上的一个文件上传到局域网服务器上
- 关于图片显示的问题... ... ... ... ... ...
- 手机短信控件的话题
- 请问如何在一个记录集中搜索除了一个特定记录外符合条件的记录啊?
- 高分请教:有关控制调制解调器拨号建立连接的问题
- 有没有splitter控件,VB下用的,最好是VB写的,有源码早好,谢谢,非常急用
- 录音
- 能否自定义排序?
- 如何写此代码了,在access找不到姓名相同的人,弹出警告框。
- 6 6 6 6 6 6=100 可以加减乘除,如何填入
dim selectid1
selectid1 = Split(selectid, "-")"id between '"& cstr(selectid1(0)) &"' and '"& cstr(selectid1(1)) &"'"