dir & file listing local and over network 
Author Message
 dir & file listing local and over network

Hi,
I am not yet so familiar with VB as with other languages,
but what I want to do is having an option to search or
select files. This selection must not be limited to the
local computer but also on the network. Everything I try
does not give me any network info.
I started trying existing examples too after the failures.
E.g. DATATREE in the VB package, it works fine. To get the
only required part of drive/file selection I stripped of
everything not necessary and it still worked.
Making a new form with the stripped statements copied gave
me the error: User-defined type not defined.
Even if I take the simple example in VB help:
 Public Sub ProviderX()
   Dim cnn2 As ADODB.Connection
   ' Open a connection using the Microsoft Jet provider.
   Set cnn2 = New ADODB.Connection
   cnn2.Provider = "Microsoft.Jet.OLEDB.3.51"
   cnn2.Open "C:\Samples\northwind.mdb", "admin", ""
   ' Display the provider.
   MsgBox "Cnn2 provider: " & cnn2.Provider
   cnn2.Close
 End Sub
It gives the same error.
I put this in a form but also in a module, no difference.
Can anybody say what is wrong.
Help would be appreciated to solve this problem.
Thanks.
Theo


Sat, 28 Aug 2004 04:56:13 GMT  
 dir & file listing local and over network
You could try using the common dialog control that should help, the other
alternative is to use the FileSystemObject - make a reference to scrrun.dll
and that should give you the info you need.  You can do some of this through
native VB libraries or through API calls


Hi,
I am not yet so familiar with VB as with other languages,
but what I want to do is having an option to search or
select files. This selection must not be limited to the
local computer but also on the network. Everything I try
does not give me any network info.
I started trying existing examples too after the failures.
E.g. DATATREE in the VB package, it works fine. To get the
only required part of drive/file selection I stripped of
everything not necessary and it still worked.
Making a new form with the stripped statements copied gave
me the error: User-defined type not defined.
Even if I take the simple example in VB help:
 Public Sub ProviderX()
   Dim cnn2 As ADODB.Connection
   ' Open a connection using the Microsoft Jet provider.
   Set cnn2 = New ADODB.Connection
   cnn2.Provider = "Microsoft.Jet.OLEDB.3.51"
   cnn2.Open "C:\Samples\northwind.mdb", "admin", ""
   ' Display the provider.
   MsgBox "Cnn2 provider: " & cnn2.Provider
   cnn2.Close
 End Sub
It gives the same error.
I put this in a form but also in a module, no difference.
Can anybody say what is wrong.
Help would be appreciated to solve this problem.
Thanks.
Theo



Sat, 18 Sep 2004 20:43:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. what happened to dir list and file list?

2. How do I retreive a list of SQL servers on local network

3. How To: Get a list of SQL Servers running on the local network

4. List SQL server my local network

5. Getting a list of servers from local network

6. help switching file names or getting list of files in a dir

7. Drive & Dir list controls

8. FTP - dir/list-command & uppercase filenames

9. Listing Dir's inside Dir's

10. file/dir loop on Novell network drive

11. Using Explorer Dir threeview and File list?

12. Dir/File List Box

 

 
Powered by phpBB® Forum Software