i have a table with rows of file names and paths. what i'm trying to do is process each file and store it in my sql database. i want to store the files as binary files (they are word and excel and pdf files) anyone know a way to do this? it would especially be useful if i could do this with a console application so i can schedule it
There are lots of examples which shows how to upload/retrieve BLOB data in SQL. For example:
HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NEThttp://support.microsoft.com/default.aspx?scid=kb;en-us;326502
You can also use OPENROWSET command with SINGLE_BLOB option in SQL2005. Please refer to:
http://msdn2.microsoft.com/en-us/library/ms190312.aspx
And you can go through the tale to retrieve the file names/paths to locate the source files, using SqlDataReader:
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader(d=ide).aspx
|||thank you!
that was exactly what i've been looking for. i grabbed the code and it works beautifully.
you saved my butt
threeo
No comments:
Post a Comment