| 发表于:2007-03-15 12:58:196楼 得分:0 |
<html> <head> <title> test </title> <meta http-equiv= "content-type " content= "text/html; charset=gb2312 "> </head> <body bgcolor= "#ffffff " leftmargin= "0 " topmargin= "0 " marginheight= "0 " marginwidth= "0 "> <tr align = "center "> <td align = "center "> this is a test! </td> </tr> <% dim strfilepath dim strconnectionstring dim conn strfilepath = server.mappath( "\test.mdb ") strconnectionstring = "provider=microsoft.jet.oledb.4.0;data source= "& strfilepath set conn = server.createobject( "adodb.connection ") conn.open strconnectionstring %> <% dim n,y,r,s,f,m n = year(now()) y = month(now()) r = day(now()) s = hour(now()) f = minute(now()) m = second(now()) if len(n) = 2 then n = "20 " & n if len(y) = 1 then y = "0 " & y if len(r) = 1 then r = "0 " & r if len(s) = 1 then s = "0 " & s if len(f) = 1 then f = "0 " & f if len(m) = 1 then m = "0 " & m dim sql dim filename,filename1 filename = n & y & r & s & f & m & ".xls " set sql = conn.EXECute( "select * into [excel 8.0;database=g:\ <%=filename%> ].sheet1 from jdxx ") %> </body> </html> 出错提示: microsoft vbscript compilation error '800a0409 ' unterminated string constant \index.asp ... set sql = conn.EXECute( "select * into [excel 8.0;database=g:\ <%=filename%> ].sheet1 这句话里有什么问题么? 我想实现动态获得文件名,如果这样不可以还可以怎么做哈,还请各位帮帮忙啊。 | | |
|