Hello everyone:
I am new in programming and I would like some help on how to save and retrieved files to a local drive.
I have created an add new record form and sometimes the user needs to add backup files, this could be on a word, PDF, txt, all file types. and I would like to give the user an OpenFileDialog option to select the file, then I would like to a save the data to a local disk, example C:\Program Files\Support|Attachments
I am using VB2005
Thanks you so much in advance
Vimal KandasamyPosted Mar 12, 2009, 2:04 AM
Hi,
what u use?..web programming or windows programming?
in web programming use FileUpload control to get files..and add following code in a button click event
FileUpload1.SaveAs("C:\Program Files\Support|Attachments"+FileUpload1.FileName);
if it s a windows programming then
add a OpenFileDialog control then add following code in OpenFileDialog_FileOk event
FileCopy(OpenFileDialog1.Filename,yourdestinationfilepath)
try this..it may help
JUliusPosted Mar 12, 2009, 12:27 PM