菜鸟请教:如何写入数据库?
下面的代码是文件上传的页面代码,我想把lmxxid_p这个变量值写入数据库,该怎么办?请高手帮忙.(我用向数据集中插入新记录的办法不行.)请说得详细些.谢谢!!<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="file:///D|/ebwz/An-Upload/complex/UpLoad_Class.vbs.asp"-->
<%
dim upload
set upload = new AnUpLoad
upload.Exe = "jpg|bmp|jpeg|gif|png"
upload.MaxSize = 2 * 1024 * 1024 '2M
upload.GetData()
if upload.ErrorID>0 then
response.Write upload.Description
else
lmxxid_p=upload.forms("select")
filename=upload.forms("text1")
response.Write(lmxxid_p)& "<br />"
response.Write "文件名:" &(filename)& "<br />"
dim file,savpath
savepath = "rj"
set file = upload.files("file1")
if not(file is nothing) then
if file.saveToFile(savepath,1,true) then
rjurl=savepath& "/" & file.LocalName
response.Write(rjurl)& "<br />"
response.Write "文件'" & file.LocalName & "'上传成功,保存位置'" & server.MapPath(savepath & "/" & file.filename) & "',文件大小" & file.size & "字节"
else
response.Write file.Exception
end if
end if
end if
set upload = nothing
%>