SQL Server, MS Word and C#.

  • Thread starter Thread starter Usman Ahmad via .NET 247
  • Start date Start date
U

Usman Ahmad via .NET 247

The DB is SQL Server. The Language is C# (2003 version)

I want to insert some word files into the database and also be able to retreive them.
This is what I want to know
1) What DataType should the fiel be in the DB.
2) How can I go about inserting and reading from this field?
 
Usman,

You should probably use the image data type in SQL Server (since the
files will most likely be of variable length).

The representation of this field on the .NET side should be an array of
bytes (byte[]). You should be able to load your document into an array, and
just set the field appropriately.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top