Showing posts with label word. Show all posts
Showing posts with label word. Show all posts

Monday, March 26, 2012

Saving documents in SQL2005

Hi,
I was wondering if I can save documents e.g. pdf, word, excel or anyother format in sql2005.
If yes what datatype should I use and what would be the best way to go about it.
Thanks in advanceYou could

But you would be better of just storing the file name and path of a file server in the database and storing the documents on the file server

Look up image datatype in BOL|||Thanks for the quick reply. So your suggestion is saving the docs on file server and the path and file name in sql server which is what I am doing at this time... but I thought saving docs in sql itself would have been a better option for security and ease of use etc.

Can you please give me some reasons why would it be better if I not save files on sql e.g. lots of load etc. so I will give that explaination to my boss here :).
Thanks|||From what I understand it'a a maint nightmare, plus you have to get the data out chunks, it's not a simple operation, and then you have to put them all back together

You have BOL?

http://msdn2.microsoft.com/en-us/library/ms130214.aspx|||Oh thank you for the link there for BOL :).
And I would go with your suggestion for using file server instead of SQL for saving files now it does makes sense.

Thank you very much for the help.

Friday, March 23, 2012

Saving a word Doc to a SQL table

Hi all,
Is it possible to save a word Doc in an image column? I need to save a doc
in a table for a web application. In the app, I want the user to able to
open a word doc, make changes and save it back. the web server is in DMZ an
d
I can't move files to and from the DMZ. I thought this would be a good
alternative.
Thanks,
JoeYes, you can. Indeed, you can even do full-text indexing on it, if you need
to search for keywords in the doc.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"jaylou" <jaylou@.discussions.microsoft.com> wrote in message
news:4499131D-2ED7-4CB3-80EC-7B58B43F53DF@.microsoft.com...
Hi all,
Is it possible to save a word Doc in an image column? I need to save a doc
in a table for a web application. In the app, I want the user to able to
open a word doc, make changes and save it back. the web server is in DMZ
and
I can't move files to and from the DMZ. I thought this would be a good
alternative.
Thanks,
Joesql

Wednesday, March 21, 2012

Saving a full text index to SQL server

Does anyone know a good solution to this problem?

I have a large filestore of all sorts of documents (word, PDF, OCR document scans, emails, etc)

I have a large SQL database that defines each of these documents (folder, parent folder, document owner, etc, etc)

I need to do combined searches over the full text of each of the documents, combined with the descriptive data of the documents that is stored in the SQL server.

Now, normally I would just use a distributed query to query both the index server and the SQL server. However I'm using a JDO enhancer to perform the query and this requires all the data to be contained within the SQL server.

Can I get the Index server to create its index in SQL tables?

Is there another way to combine the structured and unstructured data within SQL server.Hey

U can use a OPENQUERY to query on INDEX SERVER. the result of that query can be used in a SQL Server query.

To use this option you need to create a RemoteServer which redirects to a Index Server catalog.

Example:

SELECT P.Id,
P.Name,
Q.FileName,
Q.Path
FROM ( OPENQUERY(RemoteServerName,
SELECT FileName,
Path,
Write,
Rank,
etc etc
FROM SCOPE ( "e:\documents" )
WHERE CONTAINS(Contents, 'searchword')
)
AS Q INNER JOIN P ON P.Id = Q.ID
)

Greetz Da Witte

Save Word Doc in Db

hi

can u tell me plz how do i save a word doc or and excel sheet in sql server

thanx

This article might give you some info

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q308042

|||the other option could be to save the Word and Excel in the database as WordML and SpreadsheetML (Office's XML representations of Word and Excel documents). Would only work if you have Office XP or higher. Just another option. If you did this you could run queries on the documents content.|||

You have several options availble to you.

I believe the best option though is to save where the file is located on your local computer (or network) and then be able to load the document from that location.

|||can u send me a sample on SpreadsheetML|||

save it as a binary.

i've done this before without any issues.

|||

here's an example, it's super easy...

using (SqlConnection conn = new SqlConnection(Globals.ChatterDbConnectionString))

{

conn.Open();

using (SqlCommand cmd = conn.CreateCommand())

{

cmd.CommandText =

"update account_image_available " +

"set " +

"image = @.image, type = @.type " +

"where " +

"opgroup = @.gid";

cmd.Parameters.AddWithValue("image", data);

cmd.Parameters.AddWithValue("type", type);

cmd.Parameters.AddWithValue("gid", og.Id);

cmd.ExecuteNonQuery();

}

}

Save Word Doc in Db

hi

can u tell me plz how do i save a word doc or and excel sheet in sql server

thanx

This article might give you some info

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q308042

|||the other option could be to save the Word and Excel in the database as WordML and SpreadsheetML (Office's XML representations of Word and Excel documents). Would only work if you have Office XP or higher. Just another option. If you did this you could run queries on the documents content.|||

You have several options availble to you.

I believe the best option though is to save where the file is located on your local computer (or network) and then be able to load the document from that location.

|||can u send me a sample on SpreadsheetML|||

save it as a binary.

i've done this before without any issues.

|||

here's an example, it's super easy...

using (SqlConnection conn = newSqlConnection(Globals.ChatterDbConnectionString))

{

conn.Open();

using (SqlCommand cmd = conn.CreateCommand())

{

cmd.CommandText =

"update account_image_available " +

"set " +

"image = @.image, type = @.type " +

"where " +

"opgroup = @.gid";

cmd.Parameters.AddWithValue("image", data);

cmd.Parameters.AddWithValue("type", type);

cmd.Parameters.AddWithValue("gid", og.Id);

cmd.ExecuteNonQuery();

}

}

Tuesday, February 21, 2012

Sample Word docs and workbooks for DW Design

At my old job, I found a set of Word templates and Excel workbooks that helped in data warehouse specification, design and build.

Unfortunately I lost the link in my move to a new job & wondered if anyone else had it off the top of their head... ?

I believe they were all linked to a MSFT white paper but can't seem to find it Sad

Microsoft Office templates are here:

http://office.microsoft.com/en-us/templates/FX100595491033.aspx

More here:

http://www.microsoft.com/canada/smallbiz/managingbizfundamentals/resources.mspx

More info on DW process here:

http://msdn2.microsoft.com/en-us/library/ms345127.aspx

And this one is an oldie but a goodie:

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/anservog.mspx

The latest BI info is here:

http://www.microsoft.com/sql/solutions/bi/default.mspx