From: Vinay Vasu on 25 Nov 2008 00:55 Hi All, I am able to upload the files but when i put a check like Request.Form("subimt") <> "" it gives me error Error Type: Request object, ASP 0206 (0x80004005) Cannot call BinaryRead after using Request.Form collection. if i put the Request.form anywhere in the page it gives me error Cannot call BinaryRead after / before using Request.Form collection And if i am not using the Request.Form object and try using the BinaryRead's form collection script it gives me the following error: Microsoft VBScript runtime (0x800A0005) Invalid procedure call or argument: 'MidB' on line 141 where in line 141 I find is : separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1) My application runs this way: I need to upload files based on the subject. The subject is selected in the first page and then submitted to the topics page where the Upload script is written. I first have to check wether the Request.Form is null or not and only then run the upload script. Is there any other way to the same thing, any help would be highly appreciated Thanks in advance, Vinay Vasu
From: Anthony Jones on 25 Nov 2008 05:20 "Vinay Vasu" <vinay(a)vinay.com> wrote in message news:OHO2PKsTJHA.1184(a)TK2MSFTNGP03.phx.gbl... > Hi All, > > I am able to upload the files but when i put a check like > Request.Form("subimt") <> "" it gives me error > > Error Type: > Request object, ASP 0206 (0x80004005) > Cannot call BinaryRead after using Request.Form collection. > > if i put the Request.form anywhere in the page it gives me error > Cannot call BinaryRead after / before using Request.Form collection > > > And if i am not using the Request.Form object and try using the > BinaryRead's form collection script it gives me the following error: > > Microsoft VBScript runtime (0x800A0005) Invalid procedure call or > argument: 'MidB' on line 141 > > where in line 141 I find is : > separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1) > > > My application runs this way: > > I need to upload files based on the subject. The subject is selected in > the first page and then submitted to the topics page where the Upload > script is written. > I first have to check wether the Request.Form is null or not and only then > run the upload script. > > > Is there any other way to the same thing, any help would be highly > appreciated > ASPs Form collection is incompatible with file uploads. You haven't specified how you upload but my guess would be via HTML Forms file input, in which case you will be using multipart mime format. You need an additional server side component like AspUpload (which many hosting services provide for you or an equivalent). There are I believe some examples of pure VBScript code handling it which you can use at a push but they're real ugly. -- Anthony Jones - MVP ASP/ASP.NET
From: Neil Gould on 25 Nov 2008 09:27 Hi, Vinay Vasu wrote: > Hi All, > > I am able to upload the files but when i put a check like > Request.Form("subimt") <> "" it gives me error > > Error Type: > Request object, ASP 0206 (0x80004005) > Cannot call BinaryRead after using Request.Form collection. > > if i put the Request.form anywhere in the page it gives me error > Cannot call BinaryRead after / before using Request.Form collection > > > And if i am not using the Request.Form object and try using the > BinaryRead's form collection script it gives me the following error: > > Microsoft VBScript runtime (0x800A0005) Invalid procedure call or > argument: 'MidB' on line 141 > > where in line 141 I find is : > separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1) > > > My application runs this way: > > I need to upload files based on the subject. The subject is selected > in the first page and then submitted to the topics page where the > Upload script is written. > I first have to check wether the Request.Form is null or not and only > then run the upload script. > > > Is there any other way to the same thing, any help would be highly > appreciated > > Thanks in advance, > Vinay Vasu > As Anthony has pointed out, the Form object is not compatible with binary reads used for file uploads. One way around this is to employ two separate operations, one to process your form and store the relevant information in Session variables, then the other to run the upload process, inserting the Session variable data. Hope this helps, Neil
From: Mike Brind on 25 Nov 2008 15:16 "Vinay Vasu" <vinay(a)vinay.com> wrote in message news:OHO2PKsTJHA.1184(a)TK2MSFTNGP03.phx.gbl... > Hi All, > > I am able to upload the files but when i put a check like > Request.Form("subimt") <> "" it gives me error > > Error Type: > Request object, ASP 0206 (0x80004005) > Cannot call BinaryRead after using Request.Form collection. > > if i put the Request.form anywhere in the page it gives me error > Cannot call BinaryRead after / before using Request.Form collection > > > And if i am not using the Request.Form object and try using the > BinaryRead's form collection script it gives me the following error: > > Microsoft VBScript runtime (0x800A0005) Invalid procedure call or > argument: 'MidB' on line 141 > > where in line 141 I find is : > separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1) > > > My application runs this way: > > I need to upload files based on the subject. The subject is selected in > the first page and then submitted to the topics page where the Upload > script is written. > I first have to check wether the Request.Form is null or not and only then > run the upload script. > > > Is there any other way to the same thing, any help would be highly > appreciated > In addition to the help provided already, you may be able to consider incorporating an ASP.NET page or two in your site to handle this. ASP.NET offers a free file upload control that is many times better than pure VBScript classic ASP ones. -- Mike Brind MVP - ASP/ASP.NET
From: "Jon Paal [MSMD]" Jon nospam Paal on 25 Nov 2008 15:18 if you are trying to test for data, try a check like : if Request.TotalBytes > 0 then ' you have something.... end if "Vinay Vasu" <vinay(a)vinay.com> wrote in message news:OHO2PKsTJHA.1184(a)TK2MSFTNGP03.phx.gbl... > Hi All, > > I am able to upload the files but when i put a check like Request.Form("subimt") <> "" it gives me error > > Error Type: > Request object, ASP 0206 (0x80004005) > Cannot call BinaryRead after using Request.Form collection. > > if i put the Request.form anywhere in the page it gives me error > Cannot call BinaryRead after / before using Request.Form collection > > > And if i am not using the Request.Form object and try using the BinaryRead's form collection script it gives me the following > error: > > Microsoft VBScript runtime (0x800A0005) Invalid procedure call or argument: 'MidB' on line 141 > > where in line 141 I find is : > separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1) > > > My application runs this way: > > I need to upload files based on the subject. The subject is selected in the first page and then submitted to the topics page where > the Upload script is written. > I first have to check wether the Request.Form is null or not and only then run the upload script. > > > Is there any other way to the same thing, any help would be highly appreciated > > Thanks in advance, > Vinay Vasu > >
|
Next
|
Last
Pages: 1 2 Prev: Response Buffer Limit Exceeded Next: Formatting Generated SQL Statements |