Hi All,

I am using XMLHTTP object in VFP to upload files using VFP and having the
problem of string too long to fit when uploading files more than 16MB. The
error occurs when I try to concatenate the FILETOSTR data with the header
info. Temporarily I worked around it by using a memo field. But then it
gives the same error in the XMLHTTPObject.Send method. Any body knows any
workarounds?

* This is a pseudo code only

x = FILETOSTR(FileToUpload)
BuildPostData(x) && Builds the Header information etc
XMLHTTPObject.Send(x)


If the above cannot be fixed any other fox pro code that may work? I recall
Rick had a wwHTTP class, will it support files more than 16 MB?

Re: Uploading Large files using XMLHTTP by Anders

Anders
Wed Mar 03 07:32:01 CST 2004

That seems to be the limit of a VFP string.
-Anders


"Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
news:#L#l0CQAEHA.576@TK2MSFTNGP11.phx.gbl...
> Hi All,
>
> I am using XMLHTTP object in VFP to upload files using VFP and having the
> problem of string too long to fit when uploading files more than 16MB. The
> error occurs when I try to concatenate the FILETOSTR data with the header
> info. Temporarily I worked around it by using a memo field. But then it
> gives the same error in the XMLHTTPObject.Send method. Any body knows any
> workarounds?
>
> * This is a pseudo code only
>
> x = FILETOSTR(FileToUpload)
> BuildPostData(x) && Builds the Header information etc
> XMLHTTPObject.Send(x)
>
>
> If the above cannot be fixed any other fox pro code that may work? I
recall
> Rick had a wwHTTP class, will it support files more than 16 MB?
>
>


Re: Uploading Large files using XMLHTTP by Dan

Dan
Wed Mar 03 12:12:29 CST 2004

Anders is correct that you're bumpting into the VFP string lenght limit. You
might get away with breaking your string into smaller chunks and doing
Send(x+y+z) but I wouldn't recommend it.

Remember that with XMLHTTP you have to contend with HTTP timeouts. The
longer the string, the more likely you'll fail just because your HTTP
session times out.

Can you break your string into smaller chunks and do multiple sends?

Dan

Y. Sivaram wrote:
> Hi All,
>
> I am using XMLHTTP object in VFP to upload files using VFP and having
> the problem of string too long to fit when uploading files more than
> 16MB. The error occurs when I try to concatenate the FILETOSTR data
> with the header info. Temporarily I worked around it by using a memo
> field. But then it gives the same error in the XMLHTTPObject.Send
> method. Any body knows any workarounds?
>
> * This is a pseudo code only
>
> x = FILETOSTR(FileToUpload)
> BuildPostData(x) && Builds the Header information etc
> XMLHTTPObject.Send(x)
>
>
> If the above cannot be fixed any other fox pro code that may work? I
> recall Rick had a wwHTTP class, will it support files more than 16 MB?



Re: Uploading Large files using XMLHTTP by Neil

Neil
Wed Mar 03 15:46:05 CST 2004

Have you considered using FTP instead of HTTP? You can bypass FILETOSTR
limitations with this.

"Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
news:%23L%23l0CQAEHA.576@TK2MSFTNGP11.phx.gbl...
> Hi All,
>
> I am using XMLHTTP object in VFP to upload files using VFP and having the
> problem of string too long to fit when uploading files more than 16MB. The
> error occurs when I try to concatenate the FILETOSTR data with the header
> info. Temporarily I worked around it by using a memo field. But then it
> gives the same error in the XMLHTTPObject.Send method. Any body knows any
> workarounds?
>
> * This is a pseudo code only
>
> x = FILETOSTR(FileToUpload)
> BuildPostData(x) && Builds the Header information etc
> XMLHTTPObject.Send(x)
>
>
> If the above cannot be fixed any other fox pro code that may work? I
recall
> Rick had a wwHTTP class, will it support files more than 16 MB?
>
>



Re: Uploading Large files using XMLHTTP by Y

Y
Wed Mar 03 16:07:34 CST 2004

FTP is not an option due to security issues and firewall settings.

Best Regards,
Y. Sivaram

"Neil Waterworth" <nospam-or-nwaterworth@lineone.net> wrote in message
news:%23ALkwjWAEHA.3824@TK2MSFTNGP09.phx.gbl...
> Have you considered using FTP instead of HTTP? You can bypass FILETOSTR
> limitations with this.
>
> "Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
> news:%23L%23l0CQAEHA.576@TK2MSFTNGP11.phx.gbl...
> > Hi All,
> >
> > I am using XMLHTTP object in VFP to upload files using VFP and having
the
> > problem of string too long to fit when uploading files more than 16MB.
The
> > error occurs when I try to concatenate the FILETOSTR data with the
header
> > info. Temporarily I worked around it by using a memo field. But then it
> > gives the same error in the XMLHTTPObject.Send method. Any body knows
any
> > workarounds?
> >
> > * This is a pseudo code only
> >
> > x = FILETOSTR(FileToUpload)
> > BuildPostData(x) && Builds the Header information etc
> > XMLHTTPObject.Send(x)
> >
> >
> > If the above cannot be fixed any other fox pro code that may work? I
> recall
> > Rick had a wwHTTP class, will it support files more than 16 MB?
> >
> >
>
>



Re: Uploading Large files using XMLHTTP by Y

Y
Wed Mar 03 16:09:20 CST 2004

It is possible to send as multiple chuks, but I am not quite sure how to do
that XMLHTTP. (Even I am not sure whether it is possible.)

Is there are any other alternatives?

Best Regards,
Y. Sivaram

"Dan Freeman" <spam@microsoft.com> wrote in message
news:%23WsxyrUAEHA.448@TK2MSFTNGP11.phx.gbl...
> Anders is correct that you're bumpting into the VFP string lenght limit.
You
> might get away with breaking your string into smaller chunks and doing
> Send(x+y+z) but I wouldn't recommend it.
>
> Remember that with XMLHTTP you have to contend with HTTP timeouts. The
> longer the string, the more likely you'll fail just because your HTTP
> session times out.
>
> Can you break your string into smaller chunks and do multiple sends?
>
> Dan
>
> Y. Sivaram wrote:
> > Hi All,
> >
> > I am using XMLHTTP object in VFP to upload files using VFP and having
> > the problem of string too long to fit when uploading files more than
> > 16MB. The error occurs when I try to concatenate the FILETOSTR data
> > with the header info. Temporarily I worked around it by using a memo
> > field. But then it gives the same error in the XMLHTTPObject.Send
> > method. Any body knows any workarounds?
> >
> > * This is a pseudo code only
> >
> > x = FILETOSTR(FileToUpload)
> > BuildPostData(x) && Builds the Header information etc
> > XMLHTTPObject.Send(x)
> >
> >
> > If the above cannot be fixed any other fox pro code that may work? I
> > recall Rick had a wwHTTP class, will it support files more than 16 MB?
>
>



Re: Uploading Large files using XMLHTTP by Rick

Rick
Thu Mar 04 15:38:59 CST 2004

As Dan pointed out you should be able to split the string into two variables
(or however many you need to stay under 16megs). The limitation is not in
XMLHTTP but in the size of an individual string in VFP.

You can also use a DOM reference as the input POST buffer if you're using
XML that would allow you to get around this limit.

However, I would advise using HTTP for large file uploads of this kind
because HTTP uploads tend to be slow and error prone without the ability to
pick up where you left off if something goes wrong. FTP is a much better
choice even if it doesn't provide the dynamic access and immediate
processing on the other end.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web


"Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
news:#L#l0CQAEHA.576@TK2MSFTNGP11.phx.gbl...
> Hi All,
>
> I am using XMLHTTP object in VFP to upload files using VFP and having the
> problem of string too long to fit when uploading files more than 16MB. The
> error occurs when I try to concatenate the FILETOSTR data with the header
> info. Temporarily I worked around it by using a memo field. But then it
> gives the same error in the XMLHTTPObject.Send method. Any body knows any
> workarounds?
>
> * This is a pseudo code only
>
> x = FILETOSTR(FileToUpload)
> BuildPostData(x) && Builds the Header information etc
> XMLHTTPObject.Send(x)
>
>
> If the above cannot be fixed any other fox pro code that may work? I
recall
> Rick had a wwHTTP class, will it support files more than 16 MB?
>
>



Re: Uploading Large files using XMLHTTP by Y

Y
Thu Mar 04 17:03:47 CST 2004

I tried splitting and used

.SEND(x + y)

But now it gives the string long to fit error in the above line.

Best Regards,
Y. SIvaram

"Rick Strahl [MVP]" <rickstrahl@hotmail.com> wrote in message
news:OM21cEjAEHA.1288@TK2MSFTNGP10.phx.gbl...
> As Dan pointed out you should be able to split the string into two
variables
> (or however many you need to stay under 16megs). The limitation is not in
> XMLHTTP but in the size of an individual string in VFP.
>
> You can also use a DOM reference as the input POST buffer if you're using
> XML that would allow you to get around this limit.
>
> However, I would advise using HTTP for large file uploads of this kind
> because HTTP uploads tend to be slow and error prone without the ability
to
> pick up where you left off if something goes wrong. FTP is a much better
> choice even if it doesn't provide the dynamic access and immediate
> processing on the other end.
>
> +++ Rick ---
>
> --
>
> Rick Strahl
> West Wind Technologies
> http://www.west-wind.com/
> http://www.west-wind.com/weblog/
> ----------------------------------
> Making waves on the Web
>
>
> "Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
> news:#L#l0CQAEHA.576@TK2MSFTNGP11.phx.gbl...
> > Hi All,
> >
> > I am using XMLHTTP object in VFP to upload files using VFP and having
the
> > problem of string too long to fit when uploading files more than 16MB.
The
> > error occurs when I try to concatenate the FILETOSTR data with the
header
> > info. Temporarily I worked around it by using a memo field. But then it
> > gives the same error in the XMLHTTPObject.Send method. Any body knows
any
> > workarounds?
> >
> > * This is a pseudo code only
> >
> > x = FILETOSTR(FileToUpload)
> > BuildPostData(x) && Builds the Header information etc
> > XMLHTTPObject.Send(x)
> >
> >
> > If the above cannot be fixed any other fox pro code that may work? I
> recall
> > Rick had a wwHTTP class, will it support files more than 16 MB?
> >
> >
>
>



Re: Uploading Large files using XMLHTTP by swdev2

swdev2
Sun Mar 07 10:39:39 CST 2004

Hi .
did you try after splitting the file
to do TWO seperate sends ?
i surmise if you still do send (x+y) you will still hit the 16 megabyte
threshold.

Rick mentioned http post - so if you have 'good' xml receiver on the website
in question ?
get the DOM [as Rick Mentioned]
and use http post in looping fashion to send as many xml files as you need,
but - keep the filesize under 16 megabytes.
you are creating the xml file because of data, right ?
you have some table or cursor you are using to create the xml file FROM ?
yes? NO ???
anyway - chunk it into smaller files, and use multiple POSTS to send it
directly into xml receiver on the server in question.

mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
news:ONs6dsjAEHA.640@TK2MSFTNGP09.phx.gbl...
> I tried splitting and used
>
> .SEND(x + y)
>
> But now it gives the string long to fit error in the above line.
>
> Best Regards,
> Y. SIvaram
>
> "Rick Strahl [MVP]" <rickstrahl@hotmail.com> wrote in message
> news:OM21cEjAEHA.1288@TK2MSFTNGP10.phx.gbl...
> > As Dan pointed out you should be able to split the string into two
> variables
> > (or however many you need to stay under 16megs). The limitation is not
in
> > XMLHTTP but in the size of an individual string in VFP.
> >
> > You can also use a DOM reference as the input POST buffer if you're
using
> > XML that would allow you to get around this limit.
> >
> > However, I would advise using HTTP for large file uploads of this kind
> > because HTTP uploads tend to be slow and error prone without the ability
> to
> > pick up where you left off if something goes wrong. FTP is a much better
> > choice even if it doesn't provide the dynamic access and immediate
> > processing on the other end.
> >
> > +++ Rick ---
> >
> > --
> >
> > Rick Strahl
> > West Wind Technologies
> > http://www.west-wind.com/
> > http://www.west-wind.com/weblog/
> > ----------------------------------
> > Making waves on the Web
> >
> >
> > "Y. Sivaram" <ysivaram@madeupaddress.com> wrote in message
> > news:#L#l0CQAEHA.576@TK2MSFTNGP11.phx.gbl...
> > > Hi All,
> > >
> > > I am using XMLHTTP object in VFP to upload files using VFP and having
> the
> > > problem of string too long to fit when uploading files more than 16MB.
> The
> > > error occurs when I try to concatenate the FILETOSTR data with the
> header
> > > info. Temporarily I worked around it by using a memo field. But then
it
> > > gives the same error in the XMLHTTPObject.Send method. Any body knows
> any
> > > workarounds?
> > >
> > > * This is a pseudo code only
> > >
> > > x = FILETOSTR(FileToUpload)
> > > BuildPostData(x) && Builds the Header information etc
> > > XMLHTTPObject.Send(x)
> > >
> > >
> > > If the above cannot be fixed any other fox pro code that may work? I
> > recall
> > > Rick had a wwHTTP class, will it support files more than 16 MB?
> > >
> > >
> >
> >
>
>