|
From the pages below i ghet the fiollowing error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) ODBC driver does not support the requested properties. /downloads/zip.asp, line 39
Below is the source for 4 files.
I marked the error line in red. but it doesn't seem to have a problem
GetList.asp -----------
<% Dim strStartTime Dim strEndTime strStartTime = Timer 'Start up our timer %>
<% Dim DataConn, cmdDC, rsDC Dim Item Dim iFieldCount, iLoopVar, iLoopVar1 Dim strLTorGT, iCriteria, strSortBy, strOrder Dim sRequestIP
' Get download ID value from calling page ' Will not be usefull in this script ' FileToDownload=Request.QueryString("DownloadID")
' Get request information sRequestIP=Request.ServerVariables("REMOTE_ADDR")
' Set general variables FoundRecordCount=0 sDataSource = "c:\inetpub\wwwroot\Downloads\download.mdb" 'sDataSource = "d:\Desktop\webpagina gravenrode\Downloads\download.mdb" ' Local Path to Database BackgroundColor="FFFFFF" RecordFound=0
' Create and establish data connection Set DataConn = Server.CreateObject("ADODB.Connection") DataConn.ConnectionTimeout = 15 DataConn.CommandTimeout = 30
'Access connection code DataConn.Open "DBQ=" & sDataSource & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20;", "username", "password"
' Create and link command object to data connection then set attributes and SQL query Set cmdDC = Server.CreateObject("ADODB.Command") cmdDC.ActiveConnection = DataConn cmdDC.CommandText = "SELECT * FROM downloads" 'cmdDC.CommandType = 1
' Create recordset Set rsDC = Server.CreateObject("ADODB.Recordset") ' Opening record set with a forward-only cursor (the 0) and in read-only mode (the 1) rsDC.Open cmdDC, , 1, 1 %>
<HTML> <HEAD> <meta name="t Theme"" content="s 1111"" Microsoft kids> </HEAD> <BODY style='font-family: Arial; font-size: 12pt' onload="javascript:{if(parent.frames[0]&&parent.frames['menu'].Go)parent.frames['menu'].Go()}"> <center><h1>Downloads</h1></center> <align='Left'> De onderstaande bestanden zijn ingepakte word-documenten.<br> Om ze uit te pakken heeft u een programma nodig zoals <a href='http://www.winzip.com' target='new'>WinZip</a>.<br> Als u windows XP gebruikt dan heeft u het bovenstaande programma <b>niet</b> nodig.<br><br>
<form method="POST" name="Zip" action="zip.asp"> <% dim i i = 1 rsDC.MoveFirst Do while not rsDC.EOF %> <br><input type="checkbox" name="C<%=i%>" value="<%= rsDC.Fields("DownloadID") %>"><%= rsDC.Fields("DownloadDescription") %></input> <% i = i + 1 rsDC.Movenext loop %> <br><input type="reset" value="Invoer wissen" name="B3"> <input type="submit" value="Verzenden" name="B2"></p> </form> <% 'response.write "<B><a href='download.asp?DownloadID=" & rsDC.fields("DownloadID") & "' target='_self'>" & rsDC.Fields("DownloadDescription") & "</a></B> " & rsDC.Fields("DownloadDate") & " (" & round(rsDC.Fields("DownloadSize")/1024,1) & " kb)<BR>" & vbCrLf %>
<% ' Close Data Access Objects rsDC.Close Set rsDC = Nothing Set cmdDC = Nothing DataConn.Close Set DataConn = Nothing %>
<BR><CENTER><FONT SIZE='1'>
<% ' Start our End timer strEndTime = Timer
Response.Write ("Page Processed in: ")
' Take the 2nd tier wy fro the first. Response.Write FormatNumber(strEndTime - strStartTime, 4) Response.Write (" Seconds.") %>
</FONT></CENTER> </BODY> </HTML>
Zip.asp -------
<% Dim strStartTime Dim strEndTime strStartTime = Timer 'Start up our timer %> <% response.write "<HTML>" response.write "<HEAD>" response.write "<META HTTP-EQUIV='refresh' CONTENT='1; URL=downloads.zip'>"
response.write "<!--mstheme--><link rel=""stylesheet"" type=""text/css"" href=""../../_themes/kids/kids1111.css"">" & vbCrLf response.write "<meta name=""Microsoft Theme"" content=""kids 1111"">" & vbCrLf
response.write "</HEAD>"
response.write "<BODY style='font-family: Arial; font-size: 12pt' onload=""javascript:{if(parent.frames[0]&&parent.frames['menu'].Go)parent.frames['menu'].Go()}"">"
response.write "<p align='center'>Bezig met downloaden van de door u geselecteerde uitagevs van het GravenrodeNieuws" response.write "<a href='downloads.zip' target='main'>Klik hier als je link niet binnen 3 seconden start</a></p>" %>
<% dim X dim FileToDownload dim Files Files = "" for each X in Request.Form response.write X & "=" & request.form(X) & "<br>" %> <!--#include file="connect.inc" --> <% FileToDownload = right(X,len(X)-1) & "<br>" cmdDC.CommandText = "SELECT * FROM downloads WHERE (DownloadID = " & FileToDownload & ");" cmdDC.CommandType = 1
' Create recordset Set rsDC = Server.CreateObject("ADODB.Recordset") ' Opening record set with a forward-only cursor (the 0) and in read-only mode (the 1) rsDC.Open cmdDC, , 1, 1 Files = rsDC.fields("DownloadURL") & " " & Files %> <!--#include file="disconnect.inc" --> <% next %>
<% Set WshShell = Wscript.CreateObject("WScript.Shell")
SourceFileDir = "C:\inetpub\wwwroot\" ZipFileName = "C:\inetpub\wwwroot\downloads\downloads.zip" DelCmd = "del" & ZipFileName ZipCmd = "PKZip -a " & ZipFileName & " " & Files
intReturn = WshShell.Run(DelCmd, 1, True) intReturn = WshShell.Run(ZipCmd, 1, True) %>
<BR><CENTER><FONT SIZE='1'> <% ' Start our End timer strEndTime = Timer
Response.Write ("Page Processed in: ")
' Take the 2nd tier wy fro the first. Response.Write FormatNumber(strEndTime - strStartTime, 4) Response.Write (" Seconds.") %>
connect.inc -----------
<% Dim DataConn, cmdDC, rsDC Dim Item Dim iFieldCount, iLoopVar Dim strLTorGT, iCriteria, strSortBy, strOrder Dim sRequestIP
' Get download ID value from calling page FileToDownload=Request.QueryString("DownloadID")
' Get request information sRequestIP=Request.ServerVariables("REMOTE_ADDR")
' Set general variables FoundRecordCount=0 sDataSource = "c:\inetpub\wwwroot\Downloads\download.mdb" 'sDataSource = "d:\desktop\webpagina gravenrode\Downloads\download.mdb" ' Local Path to Database BackgroundColor="FFFFFF" RecordFound=0
' Create and establish data connection Set DataConn = Server.CreateObject("ADODB.Connection") DataConn.ConnectionTimeout = 15 DataConn.CommandTimeout = 30
'Access connection code DataConn.Open "DBQ=" & sDataSource & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20;", "username", "password"
' Create and link command object to data connection then set attributes and SQL query Set cmdDC = Server.CreateObject("ADODB.Command") cmdDC.ActiveConnection = DataConn %>
disconnect.inc --------------
<% ' Close Data Access Objects rsDC.Clo
------------- Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here
|