全句是
Set recordset1 = Server.CreateObject("ADODB.RecordSet")
exec= "SELECT * FROM xx where hf<>'' or hf is not null ORDER BY sj DESC"
recordset1.Open exec,my,1,1
为什么我这样写通不过,我是SQL SERVER库。。
sql="SELECT * FROM xx where hf<>'' or hf is not null ORDER BY sj DESC"
而
sql="SELECT * FROM xx where hf is not null ORDER BY sj DESC"
能通过。。。
hf是备注型字段。
"SELECT * FROM xx where hf<>'' or hf is not null ORDER BY sj DESC
"
或者"SELECT * FROM xx where hf<>"""" or hf is not null ORDER BY sj DESC
"
有些要用null
"SELECT * FROM xx where hf is not null ORDER BY sj DESC"
选出来的字段比较是否为空为
isnull()
Set recordset1 = Server.CreateObject("ADODB.RecordSet")
exec= "SELECT * FROM xx where hf<>'' or hf is not null ORDER BY sj DESC"
recordset1.Open exec,my,1,3