Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Zip
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Zip

 Post Reply Post Reply
Author
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Topic: Zip
    Posted: 18 July 2003 at 1:38am

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 Gravenrode and here and here
Back to Top
ngaisteve1 View Drop Down
Groupie
Groupie
Avatar

Joined: 26 December 2002
Location: Malaysia
Status: Offline
Points: 169
Post Options Post Options   Thanks (0) Thanks(0)   Quote ngaisteve1 Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2003 at 2:33am
Try to narrow down your error by using response.end
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.