asp下检查表中是否存在某个字段(列)函数
代码如下:
Function CheckFields(FieldsName,TableName) Flag=False sql="select * from "&TableName Set RS=Conn.Execute(sql) for i = 0 to RS.Fields.Count - 1 if RS.Fields(i).Name=FieldsName then Flag=True Exit For else Flag=False end if Next CheckFields=Flag End Function