Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2003, 05:09 PM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to open Word imbeded in SQL Srv img field?

The Word document in saved (imbeded) in a image field in the SQL Server. I don't know how to open the document.

I have tried to use FileStream and write it to a file. It makes the file but it is in a funny format: binary or something.

Here is my code:

byte[] wordole = null;
wordole = (byte[])dsDocuments.Tables[0].Rows[0]["word_object"];
int arraySize = new int();
arraySize = wordole.GetUpperBound(0);
FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write);
fs.Write(wordole, 0, arraySize+1);
fs.Close();

Does anybody have a solution?






Similar Threads
Thread Thread Starter Forum Replies Last Post
IMG Displays but text field is not displayed. shoakat ASP.NET 2.0 Professional 2 June 25th, 2007 06:04 AM
open Ms Word Application on IE Sheikh Abdul Jaweed Javascript 0 December 11th, 2006 06:39 AM
detecting if Word is open Loralee Access 7 October 20th, 2006 01:48 PM
retrieving img from sql and showing it in imgctrl harshaghanta ASP.NET 2.0 Professional 7 August 16th, 2006 05:51 PM
Deploying SessionBean in Appln Srv from Websrvr k_venky J2EE 0 November 22nd, 2003 01:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.