Click here to Skip to main content
16,014,662 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Need help with type Pin
User 584223727-Jun-10 1:00
User 584223727-Jun-10 1:00 
QuestionWhen Is The Backgroundworker Really Completed? Pin
Sonhospa21-Jun-10 8:05
Sonhospa21-Jun-10 8:05 
AnswerRe: When Is The Backgroundworker Really Completed? Pin
Luc Pattyn21-Jun-10 8:30
sitebuilderLuc Pattyn21-Jun-10 8:30 
AnswerRe: When Is The Backgroundworker Really Completed? Pin
Аslam Iqbal12-Jul-10 12:45
professionalАslam Iqbal12-Jul-10 12:45 
GeneralRe: When Is The Backgroundworker Really Completed? Pin
Sonhospa13-Jul-10 11:06
Sonhospa13-Jul-10 11:06 
GeneralRe: When Is The Backgroundworker Really Completed? Pin
Аslam Iqbal14-Jul-10 8:08
professionalАslam Iqbal14-Jul-10 8:08 
QuestionStoring and reading Word documents in SQL Pin
Jason Skala20-Jun-10 17:46
Jason Skala20-Jun-10 17:46 
AnswerRe: Storing and reading Word documents in SQL Pin
Luc Pattyn20-Jun-10 18:15
sitebuilderLuc Pattyn20-Jun-10 18:15 
Hi,

you can store binary data in an SQL field of type BLOB (and maybe others as well). It doesn't really matter what the meaning of the data is, all you can do is store it, and later retrieve it in basically the same way.

For a Word file that would mean getting all the bytes from a file, and writing them to the database; and later getting them from the database, and recreating the Word file. No more, no less.

I can't really see how you're writing to the database, as this is hidden inside the Me.TowerTableAdapter.Add_LOTO() method. I guess it is pretty straightforward.

However I have never seen a way to feed the file content as a stream to Word. So in my books the part containing
Dim test As String = System.Text.Encoding.Unicode.GetString(binaryStream)
axDoc.Paragraphs(1).Range.Text = test.ToString

is a no no.

Write the bytes to a new, possibly temporary file, then open that file with Word, probably using the Process.Start() method.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.


GeneralRe: Storing and reading Word documents in SQL Pin
Jason Skala20-Jun-10 18:36
Jason Skala20-Jun-10 18:36 
GeneralRe: Storing and reading Word documents in SQL Pin
Luc Pattyn20-Jun-10 19:13
sitebuilderLuc Pattyn20-Jun-10 19:13 
GeneralRe: Storing and reading Word documents in SQL Pin
Jason Skala20-Jun-10 20:59
Jason Skala20-Jun-10 20:59 
GeneralRe: Storing and reading Word documents in SQL Pin
DaveAuld20-Jun-10 22:39
professionalDaveAuld20-Jun-10 22:39 
GeneralRe: Storing and reading Word documents in SQL Pin
Luc Pattyn21-Jun-10 2:19
sitebuilderLuc Pattyn21-Jun-10 2:19 
QuestionNeed help with Image Pin
jaygalway211620-Jun-10 17:43
jaygalway211620-Jun-10 17:43 
AnswerRe: Need help with Image Pin
Luc Pattyn20-Jun-10 18:06
sitebuilderLuc Pattyn20-Jun-10 18:06 
GeneralRe: Need help with Image Pin
jaygalway211620-Jun-10 18:44
jaygalway211620-Jun-10 18:44 
GeneralRe: Need help with Image Pin
Luc Pattyn20-Jun-10 19:04
sitebuilderLuc Pattyn20-Jun-10 19:04 
QuestionVisStudio (VB.Net) 2005 to 2008/2010 - Errors just returning from functions Pin
QuickBooksDev19-Jun-10 1:19
QuickBooksDev19-Jun-10 1:19 
AnswerRe: VisStudio (VB.Net) 2005 to 2008/2010 - Errors just returning from functions Pin
AnnieMacD19-Jun-10 1:26
AnnieMacD19-Jun-10 1:26 
AnswerRe: VisStudio (VB.Net) 2005 to 2008/2010 - Errors just returning from functions Pin
Luc Pattyn19-Jun-10 1:58
sitebuilderLuc Pattyn19-Jun-10 1:58 
AnswerRe: VisStudio (VB.Net) 2005 to 2008/2010 - Errors just returning from functions Pin
DaveAuld19-Jun-10 4:38
professionalDaveAuld19-Jun-10 4:38 
QuestionCoalesce -- Any suggestions on how to improve this? Pin
Gregory Gadow18-Jun-10 8:08
Gregory Gadow18-Jun-10 8:08 
AnswerRe: Coalesce -- Any suggestions on how to improve this? Pin
rhuiden18-Jun-10 10:26
rhuiden18-Jun-10 10:26 
QuestionSingle Sign on Pin
berba18-Jun-10 2:59
berba18-Jun-10 2:59 
AnswerRe: Single Sign on Pin
Dave Kreskowiak18-Jun-10 8:06
mveDave Kreskowiak18-Jun-10 8:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.