FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour IIS CGI EXE USE DBF on other server or shared folder
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
IIS CGI EXE USE DBF on other server or shared folder
Posted: Wed Nov 23, 2016 08:10 AM
Dear friends,
this is a very simple cgi.
Windows 7 IIS is running on my pc
in my browser I insert this url
http://127.0.0.1/mobile/twn9.exe

Error DBCMD/2001 Workarea not in use: DBGOTOP;Function: MAIN Line: 21

The question is:
How can I set IIS in order That I can open dbf tables from a CGI EXE in a folder that is not on the same pc of IIS?

Many Thanks
marco

Code (fw): Select all Collapse
#include "simpleio.ch"
#include "Error.ch"

FUNCTION MAIN()

LOCAL cDbf     := ""
LOCAL cFile    := ""
LOCAL cIndex   := ""
LOCAL cAlias   := ""
LOCAL cFirst1  := ""
LOCAL cLast1   := ""
LOCAL cFirst2  := ""
LOCAL cLast2   := ""

SET EXCLUSIVE OFF
SET DELETED ON

USE \\172.28.2.10\apps\analisi\customer   // the path is a shared folder in a server 

cAlias := ALIAS()
GO TOP
cFirst1 := field->first
cLast1  := field->last
GO BOTTOM
cFirst2 := field->first
cLast2  := field->last
CLOSE DATABASE

 ?? [Content-type: text/html]
 ?
 ? [<html>]
 ? [<body>]
 ? [<head>]
 ? [ALIAS()]
 ? [<br>]
 ? cAlias
 ? [<br>]
 ? cFirst1
 ? [<br>]
 ? cLast1
 ? [<br>]
 ? cFirst2
 ? [<br>]
 ? cLast2
 ? [<br>]
 ? [</head>]
 ? [</body>]
 ? [</html>]


RETURN NIL
Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: IIS CGI EXE USE DBF on other server or shared folder
Posted: Wed Nov 23, 2016 12:11 PM
Dear friends,
I've created in my IIS a virtual directory.
The physical path is the same in which there is customer.dbf.
In this virtual directory I moved my cgi exe.
I've modified the USE statement in this way

Code (fw): Select all Collapse
USE customer (no path)


It seems to work
I don't know if it's is a nice idea.

Many thanks
Marco
Marco Boschi
info@marcoboschi.it

Continue the discussion