asp°ÑaccessÊý¾Ý¿âÄÚÈݵ¼³öµ½excelµÄ´úÂë
ÎÒдÁËÒ»¶Î£¬µ«ÊÇÓеãÎÊÌâ¡£°ïæ¿´¿´¡£
<%
action=request("action")
if action="make_excel" then'Ö»ÓлñȡָÁî²Å½øÐвÙ×÷
dim conn,ConnStr
ConnStr="DBQ="+server.mappath("../db/#sdoa.asa")+";DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.CreateObject("adodb.connection")
conn.Open ConnStr
dim rs,sql,filename,fs,myfile,x
Set fs = server.CreateObject("scripting.filesystemobject")
'¶¨ÒåÎļþ·¾¶£¬Ö±½ÓΪµ±Ç°Ä¿Â¼
filepath=Request.ServerVariables("APPL_PHYSICAL_PATH")
'¶¨ÒåÎļþÃû£¬ÒÔµ±Ç°Ê±¼ä×÷ÎļþÃû£¬²»»áÖØ¸´
filename = filepath&year(now)&month(now)&day(now)&".xls"
response.Write(filepath&"sss <br>")
response.Write(filename)
if fs.FileExists(filename) then
fs.DeleteFile(filename)
end if
set myfile = fs.CreateTextFile(filename,true)
Set rs = Server.CreateObject("ADODB.Recordset")
sql&nbs
Ïà¹ØÎÊ´ð£º
ÎÒÃÇÓÐÒ»¸öÍøÕ¾Ä£°å£¬www.c111.com.cn,Ï£ÍûÐÞ¸ÄһЩµØ·½£º
1£©µã»÷×ó²à¡°·þÎñÆ·ÅÆ¡±µÄÆäÖÐÒ»¸öС·ÖÀ࣬Èç¡°×ãÇò¡±£¬½çÃæµÄÓÒ²à¾Í³öÏÖÈçwww.c111.com.cn/1.jpg£¬µã»÷1.jpgÉÏ·½µÄÆäÖÐÒ»¸öÆ·ÅÆlogo£¬ÏÂÃæ¾Í³öÏÖÏà¹ØµÄÍ ......
ÎÒµÄ網頁´ú碼為ASP語ÑÔ,驗證·½Ê½為ϵ統×Ô帶µÄWINDOW驗證ģʽ.
現ÔÚÎÒÈç¹ûÒªÔÚASP´ú碼ÖÐ獲È¡當ǰµÄµÇÈëÈË ......
ÇëÎÊΪʲôÎÒÕâ¶Î´úÂë¿ÉÒÔÏÔʾÒÑÐ޸ijɹ¦picÎļþ¼ÐÖеÄͼƬ£¬µ«Êµ¼ÊÉÏÎļþ¼ÐÖеÄÎļþÃû³Æ»¹ÊǺúõġ£Íû¸ßÊÖ°ïæ¸Ä¸Ä°¡¡£
<%
Set fs = Server.CreateObject("Scripting.FileSystemObject")
S ......
IsSqlDataBase = 0 'Ö÷Êý¾Ý¿âÀàÐÍ(1=SQL£¬0=AC)
'===========================================================================
SqlDatabaseName = "ads365" 'Ö÷Êý¾Ý¿âÃû
S ......