sql = "select isnull(name1) as name1 from table where no =1"
rs.open sql,conn
我发现用as 不行,必须写成:
select name1 from table where no =1
这是为何呀?使用as就不能更新吗?
字段只要用了 as 就无法更新了,也就是执行 rs.update时就报错.
...全文
37710打赏收藏
为何取记录集时,用 select 字段名 as 字段名 from tablename 这种写法,用 as 的字段无法更新呢?
sql = "select isnull(name1) as name1 from table where no =1" rs.open sql,conn 我发现用as 不行,必须写成: select name1 from table where no =1 这是为何呀?使用as就不能更新吗? 字段只要用了 as 就无法更新了,也就是执行 rs.update时就报错.