|
-
Nov 25th, 2004, 07:08 AM
#1
Thread Starter
Fanatic Member
dim statements
hi,
can someone tell me why
VB Code:
Dim myDir as DirectoryInfo = New DirectoryInfo(Server.MapPath(PATH_DEST))
Dim fileInfos() as FileInfo = myDir.GetFiles("*.hta")
works while
VB Code:
Dim myDir as DirectoryInfo
Dim fileInfos() as FileInfo
myDir = New DirectoryInfo(Server.MapPath(PATH_DEST))
fileInfos() = myDir.GetFiles("*.hta")
not?
getting crazy on this one...
Last edited by wildcat_2000; Nov 26th, 2004 at 04:54 AM.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Nov 25th, 2004, 07:22 AM
#2
Re: dim statements
myDir = New DirectoryInfo(Server.MapPath(PATH_DEST))
fileInfos = myDir.GetFiles("*.hta")
-
Nov 26th, 2004, 04:54 AM
#3
Thread Starter
Fanatic Member
thank you mendhak,
my problem was if then i had to redefine new files, and you actually have to set to nothing the fileinfos object to do so.
for instance:
VB Code:
Dim myDir As DirectoryInfo
Dim fileInfos() As FileInfo
myDir = New DirectoryInfo(Server.MapPath(PATH_DEST))
fileInfos() = myDir.GetFiles("*.hta")
'do some stuff here
fileinfos = nothing
fileInfos = myDir.GetFiles("*.mdb")
'do some stuff here
this works, but if you comment out the fileinfos = nothing statement it will generate an error.
thank you, you showed me the way out,
cheers,
wc.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Dec 1st, 2004, 12:45 PM
#4
Originally posted by wildcat_2000
thank you, you showed me the way out,
I am the light, the truth... Sandpaper™
-
Dec 1st, 2004, 02:14 PM
#5
Thread Starter
Fanatic Member
lol
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|