Classic ASP DatabasesDiscuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
hi, all member ....
i have 2 server.......
first server is 192.168.0.10
second server is 192.168.0.57
my code inside first server..
but i want access all share folder in second server......
so, how a step i must do to fully access folder....
after run code like below, "path no found" error message display???
my code have any problem?
<%
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim rootFolder
Set rootFolder = fso.GetFolder("\\192.168.0.57")
Dim subFolders
Set subFolders = rootFolder.SubFolders
For Each folder in subFolders
response.write "<form action='showfolder.asp' method='post'>"
Response.Write folder.Name
Response.write "</form>"
Next
Set subFolders = Nothing
Set rootFolder = Nothing
Set fso = Nothing
%>
Your code will work on an Intranet, but your share name is has to be specified as \\server\share. This code allowed me to view subfolders on another computer on my network:
<%@ Language = VBScript %>
<%
'Begin buffering the HTML
'Note this MUST happen before the initial HTML tag.
Response.Buffer = True
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim rootFolder
Set rootFolder = fso.GetFolder("\\192.168.1.100\MICRONC")
Dim subFolders
Set subFolders = rootFolder.SubFolders
For Each folder in subFolders
'Response.write "<form action='showfolder.asp' method='post'>"
'Response.write "</form>"
Response.Write folder.Name & "<br>"
Next
Response.End
Set subFolders = Nothing
Set rootFolder = Nothing
Set fso = Nothing
%>
But see to that the IUSR_MACHINENAME account has relavant permission on the remote folder. But I would suggest this not a reliable solution, if you are using ASP. A VBScript (.vbs) could work for you.
_________________________
- Vijay G Strive for Perfection
happygv, thank your suggestion..
but i just a beginning programmer....
i dun know have to use .vbs and also don't know what is wmi....
can u teach me step by step...
thank.....