IIS CGI EXE USE DBF on other server or shared folder

IIS CGI EXE USE DBF on other server or shared folder

Postby MarcoBoschi » Wed Nov 23, 2016 8: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: Select all  Expand view
#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
 
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: IIS CGI EXE USE DBF on other server or shared folder

Postby MarcoBoschi » 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: Select all  Expand view
USE customer (no path)


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

Many thanks
Marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests