asp中如何将从数据库读出的内容赋给某个变量
现有access数据库,表info。这个表中有若干字段,其中有名为id的字段,为自动编号。现已知此表中某条具体信息的id字段值为1。想要将这条信息中name字段中的值读出,并将其赋给变量n。如何操作?(已使用下列代码定位):
rsgetinfo.open "Select * From info Where id=1",conn,1,1
参考答案:rsgetinfo.open "Select * From info Where id=1",conn,1,1
if not rsgetinfo.eof then
n = rsgetinfo("name")
end if