Mar 17, 2004 #1 kmsam2 Programmer May 21, 2003 29 MY I need to save Ms word document into ms sql server table. Should be BLOB right? any sample code in PB to do this? Sam.
I need to save Ms word document into ms sql server table. Should be BLOB right? any sample code in PB to do this? Sam.
Mar 17, 2004 1 #2 pgaec Programmer Aug 4, 2003 161 AU blob b,b_temp long ll_file_len integer li_file_num string ls_filename = "c:\document1.doc" ll_file_len = filelength(ls_filename) li_file_num = FileOpen(ls_filename, StreamMode!, Read!, LockReadWrite!) do while FileRead(li_file_num, b_temp) > 0 b += b_temp loop FileClose(li_file_num) UPDATEBLOB Employee SET word_doc = :b WHERE Emp_num = 100 USING Emp_tran ; Upvote 0 Downvote
blob b,b_temp long ll_file_len integer li_file_num string ls_filename = "c:\document1.doc" ll_file_len = filelength(ls_filename) li_file_num = FileOpen(ls_filename, StreamMode!, Read!, LockReadWrite!) do while FileRead(li_file_num, b_temp) > 0 b += b_temp loop FileClose(li_file_num) UPDATEBLOB Employee SET word_doc = :b WHERE Emp_num = 100 USING Emp_tran ;
Mar 17, 2004 Thread starter #3 kmsam2 Programmer May 21, 2003 29 MY thanks a lot! how to read from blob and convert back to Ms Word? Sam. Upvote 0 Downvote
Mar 18, 2004 #5 Lekar Programmer Sep 7, 2001 85 CR I have good luck today! I was looking for this! Lenin. Upvote 0 Downvote