set rs2=server.CreateObject("adodb.recordset")
sql2="SELECT @@IDENTITY as selectid from product"
rs2.open sql2,conn,1,1
if not rs2.eof and not rs2.bof then
selectid=rs2("selectid")
else
selectid=0
end if
rs2.close
set rs2=nothing
sql2="SELECT @@IDENTITY as selectid from product"
rs2.open sql2,conn,1,1
if not rs2.eof and not rs2.bof then
selectid=rs2("selectid")
else
selectid=0
end if
rs2.close
set rs2=nothing