asp Éú³É¾²Ì¬
<%
Do_Url = "http://"
'Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME")&"/shownews.asp" Ö÷Ŀ¼
aa=Request.Servervariables("url") 'ÐéÄâĿ¼
bb=InstrRev(aa,"/")
cc=left(aa,bb)
Do_Url = Do_Url&Request.ServerVariables("HTTP_HOST")&cc&"index.asp"
call SaveFile("index.htm",Do_Url)
function SaveFile(LocalFileName,RemoteFileUrl)
Dim Ads, Retrieval, GetRemoteData
On Error Resume Next
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile Server.MapPath(LocalFileName), 2
.Cancel()
.Close()
End With
Set Ads=nothing
if err <> 0 then
SaveFile = false
err.clear
else
SaveFile = true
end if
End function
%>
Ïà¹ØÎĵµ£º
aspµ¼³öEXCELÊý×Ö¸ñʽ¼°×Ô¶¯ÊÊÓ¦¿í¶ÈµÄÎÊÌâ
ÏÂÃæÖ±½Ó½øÐдúÂëÑÝʾ£º
<%
If Response.IsClientConnected Then
Response.Flush
Else
Response.End
End If
Set xlApplication = Server.CreateObject("Excel.Application")
xlApplication.Visible = False
xlApplication.Workbooks.Add
Set xlWorksheet = xl ......
aspÁ¬½Óaccess,³öÏÖ0x80004005,δָ¶¨µÄ´íÎó
aspÀ´Á¬½ÓaccessÊý¾Ý¿â
±¾µØ²âÊÔ·¢ÏÖ,¾²Ì¬Ò³¿ÉÒÔ´ò¿ª.
ºÍÊý¾Ý¿â½¨Á¢Á´½ÓµÄ´úÂëconn.open connstr Ðгö´í,µ«ÊÇÒÔǰ²âÊÔʪ¿ÉÒÔͨ¹ýµÄ.
ÔÚÍøÉÏÕÒÁËÕÒ½â¾ö°ì·¨,ÀýÈ磺 ¸øÓû§¼ÓȨÏÞ,¸ü¸ÄiisÉèÖÃ.µ«ÊÇ»¹ÊDz»ÐÐ.
¼ÌÐøÕÒ£¬ÕÒµ½Ò»ÆªÎÄÕ£¬ËµÊÇÒªÐÞ¸Äc:\windows\temp ȨÏ޵ġ£
......
Access Á¬½Ó×Ö·û´®
strConnect = “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDatabase.mdb;”
Access 2007 Á¬½Ó×Ö·û´®
strConnect = “Provider=Microsoft.ACE.OLEDB.12.0;Mode=Share Exclusive;Data Source=C:\MyDatabase.accdb;”
MSSQL Server Á¬½Ó×Ö·û´®
strConnect = &ldquo ......
ÔõôÓÃaspÅжÏÏÂÃæµÄÐÅÏ¢ÕâÀïÎÒÊÇ¿´µ½¶¯Ì¬ÍøµÄ.
FSOÎļþ¶Áд √ Jmail·¢ËÍÓʼþÖ§³Ö ×
CDONTS·¢ËÍÓʼþÖ§³ ......