Monday, March 12, 2012
How to sync data between MSDE
Thanks
Look in the BOL about SQL Server replication.
Depending on your synchronization needs, there are a variety of options. If
you don't have the Developer's Edtion of SQL Server then I recommend that
you get it so that you can use EM to develope any replication DTS packages
you may need.
Jim
"Henry" <anonymous@.discussions.microsoft.com> wrote in message
news:39504051-7ECA-4EC2-BF34-562271854B62@.microsoft.com...
> Is there any article/help/doc on how to sync data between MSDE2000? I have
installed MSDE on two XP machine, would like to sysnc the data bwteeen them.
> Thanks
|||Thanks, Jim.
I try to EM config the replication, use one machine as distributor and publisher, but it kept tell me can not connect to server because 'distributor_admin' is not defined as a remote login at the server. Do you know how to define this user? I tried creati
ng db and windows user, wouldn't work. These two machines are in a workgroup.
In my application, one MSDE(1) is collecting data, the other MSDE(2) get the data published from the (1) and read the data only. I plan to use (1) as publisher & distributor, (2) as subscriber. these two machines are not always online. Which way to sync i
s better, push or pull?
Henry
Friday, February 24, 2012
how to store and retrive .DOC file in sql
Hi frds,
My question is how should i store a .DOC file in sql 2005 as image field and how to retrive the Doc stored in Image format
Thanks & regards
Sithender.s
Have a look at the technique for storing images in http://www.codeproject.com/cs/database/ImageSaveInDataBase.asp (Storing and retrieving images from SQL Server using Microsoft .NET.)
http://www.codeproject.com/aspnet/PicManager.asp (How to upload files to Web pages in ASP.NET? How to read an image from a database using ADO.NET and display it in a Web page?)
http://www.codeproject.com/aspnet/NetPix.asp (This article explains an ASP.NET application to view and share photos online.)
This should give the basis for your intended document storage and retrieval.
|||
My question to you is why you want to store the .doc in Image data type. This data type is basically for backward compatibility with SQL Server 2000 and will not be available in next version of SQL Server. Use Varbinary data type instead of Image. However by using the following methods you can upload it to image data type as well. I have used file upload control of ASP.Net 2.0 to upload files in following example.
protectedvoid btnFileUpload_Click(object sender,EventArgs e) { if (FileUpload1.FileName.Length > 0) { int len = FileUpload1.PostedFile.ContentLength; String strDes = txtDescription.Text; byte[] file =newbyte[len]; FileUpload1.PostedFile.InputStream.Read(file, 0, len); clsDAL objDal =newclsDAL(); objDal.UploadFile(file,strDes); } } publicvoid UploadFile(Byte[] pFile,String pDesc) { SqlConnection cnnConn; SqlCommand cmmCommand; cnnConn =newSqlConnection(ConfigurationManager.ConnectionStrings["Connection String"].ConnectionString); cnnConn.Open(); cmmCommand =newSqlCommand(); cmmCommand.Connection = cnnConn; cmmCommand.CommandType =CommandType.StoredProcedure; cmmCommand.CommandText ="sp_UploadFile"; cmmCommand.Parameters.AddWithValue("@.pFile", pFile); cmmCommand.Parameters.AddWithValue("@.pDesc", pDesc); cmmCommand.ExecuteNonQuery(); }|||Sorry, i am newbie in upload file.
May i know that where do i replace my sql statement and where do i should fill in the user is, password and server path like 192.xx.xxxx.xxx??
thanks.........
how to store and read .doc file in a table
I would like to store and read .doc file in a table of sql server using C#.
Can some body help me on this? my id ispadam76@.gmail.com.
Thanks & Regard,
Padam Kumar Tripathi
you could use binary, image or varbinary datatypes. it will drag the database, queries could be slow.
On the other hand, you could save the file on a shared drive and save the path of the file location in a table. if you need code, please google.
How to store an MS Word doc in a sql 2005 table
Hello,
I want to store the contents of an MS Word document (or a brief Word extract) in a database field. This document could contain carriage returns, boldface, etc. I have tried storing the Word doc in fields of type nchar, text, and sql_variant but they do not keep the Word formatting. I found that the "Extended Properties" attribute of a field seems to retain these properties. (Though if I recall right, Extended Properties has a length limitation and is a pain in the #*&_*^! to access)
What is the "right" way to do what I'm trying? Keep in mind that we may want to view this document under either "Query Analyzer" or print a hardcopy version. And we'd like both to be intelligible!
TIA,
Barkingdog
hello,
looks like an EDMS to me
1. you have to OCR(optical character recognition) the document to obtain the text content
that you want to view in sql query analyzer. OCR is a free feature of msoffice 2003.
2. Or. run an application that do office automation and read the text line by line.Save it as a string
then save to sql server. that is if you dont trust the OCR
3. to keep the document intact as it is. Save the document as a doc file then stream it in to a
sql server blob data type
4. stream out the doc and open it with msoffice when you want to view it.
5. you may want to apply fulltext feature on the result of no 1 and 2
regards,
|||In comment to joey, I would recommend the 3 +4 as you can store the data as a Blob and enable SQL Server to use fulltext search on that blob with the appropiate settings. You wont′need to store the data in "cleartext", binary will be enough to enable full-text capability.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de|||
i see.
they need to read the docs through QA so i recommended an OCR
to store clear text.
thanks for the comment anyway
|||You are right, seems that I didnt′read that part in detail:-)HTH, Jens Suessmeyer.
http://www.sqlserver2005.de