save and retrieve files
-
good afternoon. i'm currently using vb.net and sql server. i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word. what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable... thanks in advance...
-
good afternoon. i'm currently using vb.net and sql server. i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word. what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable... thanks in advance...
Hi, If u r thinking to save Files in dB than better u set Column's datatype as image........ u can easily convert the file into array of bytes as Dim reader As New FileStream(strFileName, FileAccess.ReadWrite) ReDim pi_arrbyteFiles(reader.Length - 1) reader.Read(pi_arrbyteFiles, 0, pi_arrbyteFiles.Length) reader.Close() When u want so save the file back on the m/c u can call Dim strWrites As FileStream If File.Exists(strFileName) Then File.Delete(sfdFile.FileName) End If strWrites = File.Create(strFileName) strWrites.Write(pi_arrbyteFiles, 0, arrbyteFiles.Length - 1) strWrites.Close() End If Regards, Ritesh
-
good afternoon. i'm currently using vb.net and sql server. i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word. what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable... thanks in advance...
Here is an article which talks about this: http://www.dotnetspider.com/technology/kbpages/558.aspx[^] :zzz:----------------------------------------------------------------------:(( T Manjaly My C# Tutorials articles www.dotnetspider.com
-
Hi, If u r thinking to save Files in dB than better u set Column's datatype as image........ u can easily convert the file into array of bytes as Dim reader As New FileStream(strFileName, FileAccess.ReadWrite) ReDim pi_arrbyteFiles(reader.Length - 1) reader.Read(pi_arrbyteFiles, 0, pi_arrbyteFiles.Length) reader.Close() When u want so save the file back on the m/c u can call Dim strWrites As FileStream If File.Exists(strFileName) Then File.Delete(sfdFile.FileName) End If strWrites = File.Create(strFileName) strWrites.Write(pi_arrbyteFiles, 0, arrbyteFiles.Length - 1) strWrites.Close() End If Regards, Ritesh
-
Here is an article which talks about this: http://www.dotnetspider.com/technology/kbpages/558.aspx[^] :zzz:----------------------------------------------------------------------:(( T Manjaly My C# Tutorials articles www.dotnetspider.com