Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2005, 01:26 PM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default asp file upload script having problems with MYSQL

I am trying to connect to mysql db through asp with code that is to upload a file from a computer. I get this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/uploadexmple.asp, line 47


I am using code that i got from http://www.asp101.com/articles/jacob...load.asp, a program by jacob gilley to upload files with asp. Heres the bit thats giving me problems

ElseIf Uploader.Form("saveto") = "database" Then

            ' Open the table you are saving the file to
            dim rs
            Set RS = Server.CreateObject("ADODB.Recordset")
            RS.open "select * from lecnotes", "Driver={Mysql}; Server=mysql1.webhost.ie; Database=paulmc; UID=paul; PWD=1881 ",2,2
            RS.AddNew ' create a new record

            RS("filename") = file.filename
            RS("filesize")= File.FileSize
            RS("contenttype") = File.ContentType

            ' Save the file to the database
            File.SaveToDatabase RS("filedata")

            ' Commit the changes and close
            RS.Update
            RS.Close
        End If

lecnotes is the name of the table where i'll store the file and it has properties:



     Field Type Attributes Null Default Extra Action
filename varchar(20)
filesize varchar(20)
contenttype varchar(40)
filedata blob BINARY

any help appreciated...thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP pure script upload ittorget Classic ASP Basics 13 November 5th, 2007 03:57 AM
file upload script problem kale_tushar ASP.NET 1.0 and 1.1 Professional 7 November 30th, 2006 05:08 PM
Upload file to server from ASP script crmpicco Classic ASP Components 2 June 14th, 2006 01:25 AM
Chapter 7 file upload problems GranDad BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 August 27th, 2005 02:29 PM
Script to upload text file to SQL with errors ss2003 Beginning PHP 2 March 10th, 2004 12:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.