talahaski Posted May 14, 2004 Posted May 14, 2004 Anybody know what's wrong with this code. Dim PrimaryFileio as new Filestream(PrimaryFile,filemode.open) PrimaryFile is passed into the function ByVal. Quote
Administrators PlausiblyDamp Posted May 14, 2004 Administrators Posted May 14, 2004 What type of variable is PrimaryFile? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
talahaski Posted May 14, 2004 Author Posted May 14, 2004 Sring PrimaryFile is a string that's passed into this function. Private function CheckDup(byval Primaryfile as string) as integer I've added a messagebox before the line of code with the problem that prints out the value in PrimaryFile and its value contains the full file path correctly. The value passed in is taken from an openfiledialog.filename Quote
talahaski Posted May 14, 2004 Author Posted May 14, 2004 Got IT Apparently I had to specify FileAccess.read. I would have assumed this was implied in the fact that I'm using filemode.open. Quote
Administrators PlausiblyDamp Posted May 14, 2004 Administrators Posted May 14, 2004 You could be opening the file to write to it rather than read from it. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.