📄 batch.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="top.asp" -->
<html>
<head>
<link rel="stylesheet" href="common.css" type="text/css">
</head>
<body>
<br>
<br>
<br>
<%
On Error Resume next
Set rs=Server.CreateObject("adodb.recordset")
sql="bulk insert t_student from 'D:\Myweb\test.txt' with (FIELDTERMINATOR = ' ',ROWTERMINATOR = '\n')"
conn.begintrans
conn.execute(sql)
if Err.number=0 then
response.write"添加数据成功!"
else
conn.rollbacktrans
response.write"添加数据失败!此用户组可能已经存在或无有效数据,请查核后添加!"
'Response.Write Err.Description & "<br>"
end if
if isObject(rs) then
rs=nothing
end if
if isObject(conn) then
conn.close
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -