|
| |
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
THis cant be happening..... - 10/9/2003 16:06:59
Anyone please help, this has got to something minor to repair, I keep getting this error (error '80020009' ) when I run this small .asp code. <HTML> <BODY> <% Set Upload = Server.CreateObject("Persits.Upload") ' Capture files Upload.Save "c:\upload" ' Obtain file object Set File = Upload.Files("THEFILE") If Not File Is Nothing Then ' Build ODBC connection string Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "aspupload", , "" Set rs = Server.CreateObject("ADODB.Recordset") ' rs.Open sql, conn, 3, 3 ' Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(".\aspupload.mdb") ' If you use SQL Server, the connecton string must look something like this: ' Connect = "Driver=SQL Server;Server=MYSRV;Database=master;UID=sa;PWD=xxx" ' Build SQL INSERT statement SQL = "INSERT INTO MYIMAGES(image_blob, filename, description, filesize) VALUES(?, '" SQL = SQL & File.Filename & "', '" SQL = SQL & Replace(Upload.Form("DESCR"), "'", "''") & "', " SQL = SQL & File.Size & ")" ' Save to database File.ToDatabase Connect, SQL Response.Write "File saved." Else Response.Write "File not selected." End If %> </BODY> </HTML> the blue bold line is where explorer tells me the error is. Thanks for you time.
|
|
|
|
BeTheBall
Posts: 6354 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: THis cant be happening..... - 10/9/2003 16:33:29
Does this help: Microsoft Article
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: THis cant be happening..... - 10/10/2003 8:26:06
Not really, I know its something minor with the save methodology
|
|
|
|
BeTheBall
Posts: 6354 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: THis cant be happening..... - 10/10/2003 12:07:18
If I understand the article correctly, I think you need to move the blob info to the end of your SQL. In other words, image_blob would be the last item in the INSERT statement.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|