Hello,
My program is creating pdf files, around 50 - 100 kB each. Today I write
them in text files, then read them back to store into a database. It's
obvious for me that I can save the text file operations by creating a big
string in memory (only append), but it's unclear what class to use : String
StringBuilder, Stream something or ?
My pdf files contain mainly text, but some of them could also contain a jpeg
image.
Thank you for your help,
Gilbert 4 1814
On Oct 20, 9:17*am, "Gilbert Tordeur" <gilbert.tord...@orange.fr>
wrote:
Hello,
My program is creating pdf files, around 50 - 100 kB each. Today I write
them in text files, then read them back to store into a database. It's
obvious for me that I can save the text file operations by creating a big
string in memory (only append), but it's unclear what class to use : String
StringBuilder, Stream something or ?
My pdf files contain mainly text, but some of them could also contain a jpeg
image.
The typical (as far as I am aware) way of storing binary data into a
database is to use a binary reader and a memory stream.
If you just need to "store" the string, then String is fine, but if you will
be doing manipulation of the string, then use StringBuilder.
If you want to compact the data, you could write the data out using a
BinaryWriter.
"Gilbert Tordeur" <gi*************@orange.frwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hello,
My program is creating pdf files, around 50 - 100 kB each. Today I write
them in text files, then read them back to store into a database. It's
obvious for me that I can save the text file operations by creating a big
string in memory (only append), but it's unclear what class to use :
String StringBuilder, Stream something or ?
My pdf files contain mainly text, but some of them could also contain a
jpeg image.
Thank you for your help,
Gilbert
Gilbert,
As it are real big strings, then zip them first (there is more than one
method in Net for that) and put the Zip object as a blob (byte array or the
other name is image) in your database. http://msdn.microsoft.com/en-us/libr...zipstream.aspx http://www.vb-tips.com/DataSetImage.aspx
Cor
"Gilbert Tordeur" <gi*************@orange.frwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hello,
My program is creating pdf files, around 50 - 100 kB each. Today I write
them in text files, then read them back to store into a database. It's
obvious for me that I can save the text file operations by creating a big
string in memory (only append), but it's unclear what class to use :
String StringBuilder, Stream something or ?
My pdf files contain mainly text, but some of them could also contain a
jpeg image.
Thank you for your help,
Gilbert
Cor, Scott,
May thanks for your advices.
Have a good week-end,
Gilbert This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David Mertz |
last post by:
At the suggestion of one of my correspondents, I slightly reluctantly
implemented an RSS feed for my website/writing. It is perhaps a bit
crude so far, but maybe I'll spiff it up. The RSS also...
|
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: Chris Cioffi |
last post by:
I started writing this list because I wanted to have definite points
to base a comparison on and as the starting point of writing something
myself. After looking around, I think it would be a...
|
by: Xah Lee |
last post by:
in computer languages, often a function definition looks like this:
subroutine f (x1, x2, ...) {
variables ...
do this or that
}
in advanced languages such as LISP family, it is not uncommon...
|
by: Pierre Rouleau |
last post by:
Greetings,
I'm wondering why the >> operator does not use the write() method of a
class derived from the built-in file class as in DerivedFile below.
In the following example:
- StringFile...
|
by: emerth |
last post by:
Suppose I have these 4 typedefs, where each of the 2nd parameter in
each is a simple class that just contains a different number of strings:
typedef map < char*, cctrlrec_data, ltstr >...
|
by: Xah Lee |
last post by:
What are OOP's Jargons and Complexities
Xah Lee, 20050128
The Rise of Classes, Methods, Objects
In computer languages, often a function definition looks like this:
subroutine f (x1, x2, ...)...
|
by: Scott Smith |
last post by:
Several attributes and interface methods I'm using refer to resources (such
as strings or icons) by a numeric ID. This was the only way to refer to
resources in unmanaged code (C++, for example),...
|
by: Jm |
last post by:
Hi all
I feel stupid for asking this, but i just went to use the left() function
from vb6 only to find it doesnt do what it used to under .NET. Im assuming
theres something else now im meant to...
|
by: Xah Lee |
last post by:
What are OOP's Jargons and Complexities
Xah Lee, 20050128
Classes, Methods, Objects
In computer languages, often a function definition looks like this:
subroutine f (x1, x2, ...) {...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |