
对ACCESS数据库里的两张表进行同步更新 20
数据库里有两个表:news表和article表news表有ID字段和content字段article表有ID字段和content字段比如当我对news表中ID=1的con...
数据库里有两个表:news表和article表
news表有ID字段和content字段
article表有ID字段和content字段
比如
当我对news表中ID=1的content内容进行修改时
要求article表中ID=1的content也自动更新一样的内容
用ASP该怎么写?请回答得全面点。 展开
news表有ID字段和content字段
article表有ID字段和content字段
比如
当我对news表中ID=1的content内容进行修改时
要求article表中ID=1的content也自动更新一样的内容
用ASP该怎么写?请回答得全面点。 展开
2个回答
展开全部
rs.open"select * from news,article where news.id="&取值&" and article.id="&取值&"“,conn,3,3
if rs.eof then
response.write"没有找到NEWS.ID和ARTICLE.id相同的数据"
else
rs.("news.content")=CONTENT的取值
rs.("article.content")=CONTENT的取值
rs.update
不记得这样行不行,你可以试试。
conn.execute("update news,article set news.content="&content的取值&" and article.content="&content的取值&" news.id="&取值&" and article.id="&取值&"")
if rs.eof then
response.write"没有找到NEWS.ID和ARTICLE.id相同的数据"
else
rs.("news.content")=CONTENT的取值
rs.("article.content")=CONTENT的取值
rs.update
不记得这样行不行,你可以试试。
conn.execute("update news,article set news.content="&content的取值&" and article.content="&content的取值&" news.id="&取值&" and article.id="&取值&"")
来自:求助得到的回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询