#12009/7/16 13:22:46
                            
                                sub lanmu(tables)
#include file="conn.asp"
 	dim lanmurs,sql,n
	set lanmurs=server.CreateObject("ADODB.Recordset")
	select case tables
		case "notice" sql="select * from news"
		case "cultural" sql="select * from cultural"
		case "wildfungus" sql="select * from wildfungus"
		case "meishi" sql="select * from meishi"
		case "changshi" sql="select * from changshi"
		case "jiankang" sql="select * from jiankang"
	end select
	lanmurs.open sql,1,2     ---------------------这里有出错
	n= lanmurs.recordcount
	if n>5 then
		n=5
	end if
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
还有1个sub 
sub member(table)
#include file="conn.asp"
 	dim rs,sql
	set rs=server.CreateObject("ADODB.Recordset")
	select case table
		case "notice" sql="select * from notice"
		case "users" sql="select * from users"
	end select
	rs.open sql,conn,1,2             ------------------------------几乎一样 但是这个sub是正确的
	n= rs.recordcount
	if n>5 then
		n=5
	end if
这个奇怪的错误折腾我很久了,看了好几遍RECORDSET的介绍也没弄明白错在哪里 请高人指点啊.
                                
                                
                                
                            
                            
                                
                                    编辑历史:pissa 在 2009-7-16 13:26:11 编辑过