Ask a Question related to ASP Database, Design and Development.
-
Agoston Bejo #1
Binary file IO
Hi,
What I would like to do is load a file's contents from a file on the server
and put the contents
into a record in a database. For this I need to load the contents in binary
format into a
variable. Anywhere I looked, I've only found text I/O in ASP.
(FileSystemObject and TextStream).
How can I load any kinds of file into a byte array? Or is it enough to load
it as a text stream
and then treat the loaded string as a byte array?
Thx,
Gus
Agoston Bejo Guest
-
Reading Binary File
I am converting a PHP script and I need to know what the eqivelent of "fread('file', 1)" for CF. I am reading a binary file. -
What is the fastest way to return the binary of a file?
Currently this is what I'm doing and it takes about 30 - 60 seconds for 88 kb file to show in my web browser from my web service. I think that is... -
How to get binary file from SQL field?
I want to display binary data from SQL server 2000 in an asp page. The data comes from a Windows Sharepoint Services document library. The raw... -
Why can't I create a binary file ?
open FH, ">1.txt"; binmode FH; binmode STDOUT; print FH "123m,zxnc,mzxnc,mzncm,zxc"; close FH; Why the output still a text file ? -
Output binary file
the company I work for sometimes has users link to our banners, and display them on there own sites. the problem is that some of the banners have... -
Aaron [SQL Server MVP] #2
Re: Binary file IO
Are these plain text files? Have you considered just using
FileSystemObject's ReadAll() method and just inserting the text as, well,
text?
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Agoston Bejo" <gusz1@freemail.hu> wrote in message
news:uyivD$$YEHA.648@TK2MSFTNGP10.phx.gbl...> Hi,
> What I would like to do is load a file's contents from a file on the
> server
> and put the contents
>
> into a record in a database. For this I need to load the contents in
> binary
> format into a
>
> variable. Anywhere I looked, I've only found text I/O in ASP.
> (FileSystemObject and TextStream).
> How can I load any kinds of file into a byte array? Or is it enough to
> load
> it as a text stream
>
> and then treat the loaded string as a byte array?
>
> Thx,
> Gus
>
>
Aaron [SQL Server MVP] Guest
-
Agoston Bejo #3
Re: Binary file IO
May be any type of files.
Right now I'm trying just that (handling binary data as text), but it would
be good to know for sure that this won't break for a jpg, for example.
Gus
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:edOEWfAZEHA.2840@TK2MSFTNGP11.phx.gbl...> Are these plain text files? Have you considered just using
> FileSystemObject's ReadAll() method and just inserting the text as, well,
> text?
>
> --
> [url]http://www.aspfaq.com/[/url]
> (Reverse address to reply.)
>
>
>
>
>
>
> "Agoston Bejo" <gusz1@freemail.hu> wrote in message
> news:uyivD$$YEHA.648@TK2MSFTNGP10.phx.gbl...>> > Hi,
> > What I would like to do is load a file's contents from a file on the
> > server
> > and put the contents
> >
> > into a record in a database. For this I need to load the contents in
> > binary
> > format into a
> >
> > variable. Anywhere I looked, I've only found text I/O in ASP.
> > (FileSystemObject and TextStream).
> > How can I load any kinds of file into a byte array? Or is it enough to
> > load
> > it as a text stream
> >
> > and then treat the loaded string as a byte array?
> >
> > Thx,
> > Gus
> >
> >
>
Agoston Bejo Guest
-
Aaron [SQL Server MVP] #4
Re: Binary file IO
> May be any type of files.
would> Right now I'm trying just that (handling binary data as text), but itYou can do it, but there are several reasons you shouldn't, IMHO.> be good to know for sure that this won't break for a jpg, for example.
[url]http://www.aspfaq.com/2149[/url]
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
Aaron [SQL Server MVP] Guest
-
Antonin Foller #5
Re: Binary file IO
See [url]http://www.pstruh.cz/tips/detpg_read-write-binary-files.htm[/url]
Antonin
"Agoston Bejo" <gusz1@freemail.hu> wrote in message
news:uyivD$$YEHA.648@TK2MSFTNGP10.phx.gbl...server> Hi,
> What I would like to do is load a file's contents from a file on thebinary> and put the contents
>
> into a record in a database. For this I need to load the contents inload> format into a
>
> variable. Anywhere I looked, I've only found text I/O in ASP.
> (FileSystemObject and TextStream).
> How can I load any kinds of file into a byte array? Or is it enough to> it as a text stream
>
> and then treat the loaded string as a byte array?
>
> Thx,
> Gus
>
>
Antonin Foller Guest



Reply With Quote

