⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_cyj_add_confirm.asp

📁 一套石油公司内部的运营管理系统
💻 ASP
字号:
<!--#include virtual="/include/DBCon.inc"-->
<%
syear=request.form("year")
text1=request.form("text1")
text2=request.form("text2")
text3=request.form("text3")
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select well_id from oil.oil_well where well_id='" &text1& "' and well_type='1'"
rs.open SQL,conn
if rs.eof then
	response.redirect "/profile/errorpage.asp?title=添加新的措施动态数据&msg=数据库里没有你添加的水井号!请确认井号是否是正确或者添加新井。" 
else
	rs.close
	SQL="select cyj_id from oil.oil_cyj"
	rs.open SQL,conn,1,1
	if rs.eof and rs.bof then
		maxId=0
		rs.close
	else
		rs.close
		SQL="select MAX(cyj_id) as maxId from oil.oil_cyj"
		rs.open SQL,conn,1,1
		maxId=rs("maxId")
		rs.close
	end if
	SQL="select * from oil.oil_cyj"
	rs.open SQL,conn,1,3
	rs.addnew
	rs("cyj_id")=cint(maxId)+1
	rs("cyj_well_id")=text1
	rs("cyj_date")=text2
	rs("cyj_yxsl")=text3
	rs.update
	rs.close
end if
response.redirect "frm_cyj.asp?year=" &syear
%>
<!--#include virtual="/include/DBClose.inc"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -