当前位置: 代码迷 >> ASP >> 问你个简单的ASP+ACESS有关问题,小弟我想执行这条
  详细解决方案

问你个简单的ASP+ACESS有关问题,小弟我想执行这条

热度:337   发布时间:2012-03-16 16:34:56.0
问你个简单的ASP+ACESS问题,我想执行这条
问你个简单的ASP+ACESS问题,我想执行这条
sql= "Delete   *   From   art   where   id   not   in(Select   min(id)   from   art   group   by   art_title) "
指令,数据库名是3609664.mdb
请问把它写成ASP文件来执行《!具体!》该怎么写?
谢谢

------解决方案--------------------
set connobj=Server.CreateObject( "ADODB.CONNECTION ")
connobj.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath( "3609664.mdb ")
connobj.execute "Delete * From art where id not in(Select min(id) from art group by art_title) "
connobj.close
set connobj=nothing
------解决方案--------------------
Delete * From art where id not in(Select min(id) from art group by art_title)

把sql语句的 * 号去掉