Can anybody help me.
I have the following code to test the xBscript.dll. I have registered the
Xbscript.dll the internet server. And I tried to open a DBF file TEST.DBF through the following code. But it is generating an error to open
the DBF file.
The problem is only to supply the proper path to the DBF.
I don't know how to give the path to open a DBF file from the internet
server.
Please guide me.
- Ramesh Babu P
- Code: Select all Expand view RUN
<HTML>
<OBJECT ID="XBScript" WIDTH=0 HEIGHT=0
CLASSID="CLSID:ADB21CAC-9B03-4D64-9097-83B05741FDAF"
CODEBASE="http://www.xharbour.com/ondemand/xbscript.cab#Version=2,0,0,2">
</OBJECT>
<SCRIPT language=XBScript></script>
<HEAD>
</head>
<BODY>
<P>xbScript Sample 1</p>
<PRE ID="DynBody"></pre>
<SCRIPT language=XBScript>
PROCEDURE Main()
SET DATE BRIT
SET CENT ON
REQUEST CDX
Window:DynBody:innerHTML := "<P>Client Side - Dynamic content.</p>" + ;
"<P>Today is: " + dToC( Date() ) +" " + CMONTH(DATE()) +" "+ STR(DAY(DATE()),2)+", " + STR(YEAR(DATE()),4)+"</p>"
DynBody:innerHTML += "<P>xbSCript Version: " + PP_Version + "</p>"
CLOSE ALL
DynBody:innerHTML += "<P>File "+CurDrive()+":\"+Curdir()
USE TEST ALIAS TEST EXCLUSIVE NEW VIA "DBFCDX"
INDEX ON first TO test
SET INDEX TO test
PRIVATE nCounter := 1
IF USED()
DynBody:innerHTML += "<P>File "+CurDrive()+":\"+Curdir()+"\TEST.DBF is used at "+TIME()+"</p>"
ELSE
DynBody:innerHTML += "<P>File "+CurDrive()+":\"+Curdir()+"\TEST.DBF is not used.</p>"
ENDIF
DO WHILE !EOF()
DynBody:innerHTML += "<P>"+STR(nCounter,3)+". Rec# :" + STR(nCounter) + ", " + test->first + ", " + test->last + ", " + test->street + ", " + test->city + ", " + test->state + ", " + test->zip + "</p>"
SKIP
nCounter++
ENDDO
DynBody:innerHTML += "<P>No of Records displayed are : "+LTRIM(STR(nCounter-1))+"</p>"
CLOSE ALL
RETURN
</SCRIPT>
<P>Eof() ASP Script</p>
</BODY>
</HTML>