sql里user字段添加不上,怎么办?
set rs=server.CreateObject( "adodb.recordset ")
sql= "select * from Gq "
rs.open sql,conn,1,3
rs.addnew
rs( "title ")=request( "title ")
rs( "gq ")=request( "gq ")
rs( "[user] ")=request( "user ")
rs.update
别的字段都添加进去了就是user字段添加不进去,我知道在SQL-server里要加[]但还是添加不上去,该怎么写呢?
------解决方案--------------------用insert into 加上[]
用Rs时就不用[]了。
------解决方案--------------------set rs=server.CreateObject( "adodb.recordset ")
sql= "select * from Gq "
rs.open sql,conn,1,3
rs.addnew
rs( "title ")=request( "title ")
rs( "gq ")=request( "gq ")
rs( "user ")=request( "user ")
rs.update
------解决方案--------------------user只有在select等语句中才要加[] 如,select [user] from Gq
其他地方都不需要
------解决方案--------------------rs( "user ")=request( "user ")