ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 13th, 2000, 05:47 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
AppendChunk Giving error

<i><b>Originally posted by : Shawn (shawn@speaketh.com)</b></i><br />Hi, I have previously posted a question about appendchunk error. I have check that the SNA server and the MDAC component are all of the latest version. Why is it that the script still give this error: ADODB.Field error '800a0c93' <br />Operation is not allowed in this context. <br />I have a page to upload a file to the server. With 3 fields, url, category, blob(the uploaded file). The file is uploaded to the server but the script keep giving error message and the database is not updated.<br /><br />Below is the code for the script.<br /><br /><br />Response.Expires=0<br />Response.Buffer = TRUE<br />Response.Clear<br />byteCount = Request.TotalBytes<br /><br />RequestBin = Request.BinaryRead(byteCount)<br />Dim UploadRequest<br />Set UploadRequest = CreateObject("Scripting.Dictionary")<br /><br />BuildUploadRequest RequestBin<br /><br /><br />url = UploadRequest.Item("url").Item("Value")<br />category = UploadRequest.Item("category").Item("Value")<br />graphic = UploadRequest.Item("blob").Item("Value")<br /><br /><br />contentType = UploadRequest.Item("blob").Item("ContentType")<br />filepathname = UploadRequest.Item("blob").Item("FileName")<br />filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"""))<br />value = UploadRequest.Item("blob").Item("Value")<br /><br />'Create FileSytemObject Component<br /> Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")<br /><br />'Create and Write to a File<br /> pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14<br /> Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Re quest.ServerVariables("PATH_INFO")),pathEnd)&filename)<br /> MyFile.Write getString(value)<br /> MyFile.Close<br /><br /> <br /><br />Set conn = Server.CreateObject("ADODB.Connection")<br />conn.open "DSN=Classicpost"<br /><br /><br />sql = "SELECT * FROM Advertisement"<br />Set rs = Server.CreateObject("ADODB.Recordset")<br />rs.Open sql, conn, 3, 3<br /><br />rs.AddNew<br />rs.Fields("url") = url<br />rs.Fields("category") = category<br /><br />picturechunk = graphic & chrB(0)<br />rs.Fields("graphic").AppendChunk picturechunk<br /><br /><br />rs.Update<br />conn.close<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > AppendChunk Giving error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT