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.
 
Back
Top