Hi all,
My following program code works fine on win 2K server but the same is not working on win2K3 server. It's showing error as page cannot be displayed. After debugging, I found that fso.opentextfil e is not working over win2k3. Can anybody pl. explain why it's not working and how to solve it?
help reqd urgently pl.
thx in advance.
My following program code works fine on win 2K server but the same is not working on win2K3 server. It's showing error as page cannot be displayed. After debugging, I found that fso.opentextfil e is not working over win2k3. Can anybody pl. explain why it's not working and how to solve it?
help reqd urgently pl.
thx in advance.
Code:
SearchDatabase <SCRIPT LANGUAGE=JScript> var wsh = new ActiveXObject("WScript.Shell") wsh.Run("cmd /C dir *.txt > c:\\temp.txt", 0) </Script> <%@ LANGUAGE="VBSCRIPT"%> <% strM = Getmyfile() function Getmyfile() Dim intRet,reqdString Set fso = createobject("scripting.filesystemobject") Set ts = fso.opentextfile("C:\temp.txt") reqdString = null Do While Not ts.AtEndOfStream data = ucase(trim(ts.readline)) if instr(data,"database") Then reqdString = trim(split(data,":")(1)) Exit Do End if loop ts.close Set ts = nothing Set fso = nothing Getmyfile = reqdString End function %> <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <%Response.Write("Your databse is : " & reqdString)%> </BODY> </HTML> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <P> </P> </BODY> </HTML>
Comment