you can use a blob field or a binary one. a in a bynary field you can put evry thing you want.There you put only bytes and get back also bytes the way you interpret that bytes is your choice.
In this way you can read an word file sequencialy and add bytes to that field when you reach the feof you do the commit. same for reading.I say that because if you have a big word file and first read it and after put it in the data base you can
crush 1. because the memory2. because of the database server which can receive only a fix amount of bytes in a transmision.
best regards Black Ares P.S. if you want I can give you one book adodotnet coock book where these fields are more explained with examples give me an empty email to reply to you with the book if you want----- Original Message ----- From: "Richard Thomas" <rthomas@xxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Monday, October 29, 2007 11:10 AM Subject: Re: sql server 2005 express database design
Hi Andy:The Asp and Windows both use the Framework to do allot of things. If the Asp articles use components from the Framework it should work in a Windows App as well. Anyway, I have never, at least not yet, worked with blobs, clobs or anything else other than the basic VarChar and other standard Column Types nor had to worry about preservation of a Word Document's control characters so I'm afraid I'm out of ideas big guy.Perhaps one of the gurus will have more. Rick Farmington Mich. USA----- Original Message ----- From: "Andy B" <a_borka@xxxxxxxxxxxxx>To: <programmingblind@xxxxxxxxxxxxx> Sent: Sunday, October 28, 2007 7:18 AM Subject: RE: sql server 2005 express database designHi... I found lots of articles on that sort of stuff too. The problem I have isthat most people want to use asp and a web server to do this type of stuffand I don't... I need an example of this in a c# forms program... -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Richard ThomasSent: Sunday, October 28, 2007 5:20 AM To: programmingblind@xxxxxxxxxxxxx Subject: Re: sql server 2005 express database design Hi Andy: Googling I found allot of articles on the subject of storing Ms WordDocuments on Sql Server DataBases but my Address Bar is messed up so I can'tcopy and paste the links easily.Anyway, they all talk about storing the documents as Blob or Binary fields, most Blobs. So scheck out if Blobs are still used or whatever is currently used in your version of the DataBase to store Image files and you should begood to go.There were articles on Storing and Restoring those files, mostely bits and pieces in Forum threads but I'm guessing you could find a complete articleGoogling if you get lucky. Anyway, Hope this helps. Rick Farmington Mich. USA ----- Original Message ----- From: "Andy B" <a_borka@xxxxxxxxxxxxx> To: <programmingblind@xxxxxxxxxxxxx> Sent: Saturday, October 27, 2007 6:26 PM Subject: RE: sql server 2005 express database designI can try it a little later. Does all of that keep the original word formatting? I.e. fonts, tables, lists, styles and so on? Or does it strip all of that away. I would need to keep the presentation of the word file (or any of the files) in tact. Especially PowerPoint presentations. -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Jamal Mazrui Sent: Saturday, October 27, 2007 11:07 AM To: programmingblind@xxxxxxxxxxxxx Subject: RE: sql server 2005 express database design If your project is set to reference the Microsoft.VisualBasic.dll assembly, I think you can use syntax like the following: string sWordFile = @"C:\temp\MyWordFile.doc"; string sWordBody = Microsoft.VisualBasic.FileIO.FileSystem.ReadAllText(sWordFile); Then assign sWordBody to a VarChar database field. Hope this helps, Jamal On Fri, 26 Oct 2007, Andy B wrote:Date: Fri, 26 Oct 2007 19:40:01 -0400 From: Andy B <a_borka@xxxxxxxxxxxxx> Reply-To: programmingblind@xxxxxxxxxxxxx To: programmingblind@xxxxxxxxxxxxx Subject: RE: sql server 2005 express database design Ok... Sorry. Maybe I should make things a little clearer (oops on mypart).I have some good background in MySQL server work with db design and light weight server admin. I haven't had much experience in creating complex databases, but my business project is having me work that one out. I am OK with c# and can usually find out how to do a lot of things. What I need to know is how would you take a word file (.doc) for instance, and use c# to actually insert the file itself (binary data) into the db. From what I can see, it requires converting the image/file into a byte array first and then putting it into the db. My problem is that almost everybody uses asp.net 2.0 to show examples... Ineed c# windows forms to do it with... any ideas?-----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Richard Thomas Sent: Friday, October 26, 2007 7:18 PM To: programmingblind@xxxxxxxxxxxxx Subject: Re: sql server 2005 express database design Hi Again: You would have to define your DataBase: then write a program to populate it with Data: Then a program to access the stored Data: Actually they would be classes designed around the Tables you build for the database and the Window you want to use to look at the data. What I would do, and have done. I wrote a Logger Class that I could use to print things out easily into a txt file while testing and debugging. Then: Wrote a program in CSharp to define the DataBase. It may be better to use a script for this but it is the way I started because I knew a little programming but no scripting at the time. Then I wrote a class that generated some test data for the data base and printed it out using the logger. When that looked good I created a Window to display the data. That's the process. I wrote the first DataBase Definition in CSharp but converted everything to Vb.net and have continued working in it today. As for examples there are plenty of works out there you can find Googling. Problem is you will have to know what to look for. For example, programatically creating a DataBase, Creating a DataBase using Scripts, creating a DataBase using the Sql Server Management StudioExpress etc. .. .Read a little and keep asking questions. You will use t-sql in any case so that is something to get a quick overview of. Also, Sql Server Express and DataTypes. If you are new to DataBases look at Create DataBase and Create Table statements to get an overview of a DataBase's structure. Rick Farmington Mich. USA ----- Original Message ----- From: "Andy B" <a_borka@xxxxxxxxxxxxx> To: <programmingblind@xxxxxxxxxxxxx> Sent: Friday, October 26, 2007 1:04 PM Subject: RE: sql server 2005 express database design How would you do something like this? Any simple examples that I can play with? I will probably be using c# to be the front end... -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sina Bahram Sent: Friday, October 26, 2007 12:19 PM To: programmingblind@xxxxxxxxxxxxx Subject: RE: sql server 2005 express database design If you store the files in the database, you actually will get faster performance, all around. Take care, Sina -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of james.homme@xxxxxxxxxxxx Sent: Friday, October 26, 2007 11:58 AM To: programmingblind@xxxxxxxxxxxxx Subject: Re: sql server 2005 express database design Hi andy, In my opinion, you should store the files in the file system and the information about the files in the database. Out of curiosity, what are you going to use as the front-end? Thanks. Jim James D Homme, , Usability Engineering, Highmark Inc., james.homme@xxxxxxxxxxxx, 412-544-1810 "It's more important for me to start to do the right thing than it is to wait until I think I can do it just right." "Andy B" <a_borka@sbcgloba l.net> To Sent by: programmingblind@xxxxxxxxxxxxx programmingblind- cc bounce@freelists. org Subject sql server 2005 express database design 10/26/2007 11:44 AM Please respond to programmingblind@ freelists.org I need to write a program that references, categorizes, indexes andallows searches (including full text searches) on data inserted into thedatabase.Different data formats like Word, rtf, txt, html and other sources would have to be put into the database. Is it easier/better to insert the files themselves (i.e. insert the actual word file) or just thetext+formatting of the word file? Any ideas how to do this stuff or whereI can find out more?__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind__________View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind