Some warnings and error

This forum is meant for questions and discussions about the X# language and tools
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Some warnings and error

Post by Karl-Heinz »

Hi Horst,

33 DBSERVER: Data type error

(very) strange ... at least in VO such an error is thrown e.g. when you open an cdx that doesn´t belong to a dbf !

Are you sure, that when you open "useronline.dbf" with a tool like "dbmax" that "useronline.cdx" is opened without an error ?

if the are no sensitive data involved, please post the dbf and cdx.

regards
Karl-Heinz
User avatar
wriedmann
Posts: 3726
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Some warnings and error

Post by wriedmann »

Hi Horst,

was is the index expression of this order bag (if there are more orders, please show us them all)?

To me it seems like a incompatibility of the order expression with the application.

If you create a small console application, you can open the DBF and search?

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Horst
Posts: 327
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Thanks for trying to help

As i wrote before it works when i call the cgi from the command prompt but not with the IIS as the caller. So i think its a IIS problem and i cant transform my VO CGI into a .NET CGI.

Later i will try to built a IIS Extension.

Horst
User avatar
wriedmann
Posts: 3726
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Some warnings and error

Post by wriedmann »

Hi Horst,

unfortunately I'm not a IIS fan - I rather prefer Apache.

And I'm very short on time so I cannot do my own tests with IIS.
Personally I would try to add the Vulcan runtime assemblies as fixed references to your CGI executable and force their loading, maybe calling any Assembly.Load...() static method.

I think that the CGI exe fails to load the Vulcan Macrocompiler at runtime when called from IIS.
The big difference between a VO (Win32) executable and a .NET executable is that the VO executable searches the path for DLLs to load, whereas the .NET executable searches them only in the current directory or in the GAC. And the IIS seems to move the CGI executable somewhere, and load it from there for security reasons.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4788
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Some warnings and error

Post by Chris »

Good point from Wolfgang! Horst, please try loading the macto compiler manually, before you use any dbfs as below:

LOCAL lLoaded AS LOGIC
lLoaded := System.Reflection.Assembly.LoadFile("<path to file>VulcanMacroCompiler.dll") != NULL

Also print the value of lLoaded somewhere does it retunr tru or false when using it throus IIS?

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Horst
Posts: 327
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Hi Chris

I tried your example. My Logfile say's the DLL is loaded. but the the output is still not sorted. :-(

Horst
User avatar
Horst
Posts: 327
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

I tried the example form a IIS forum calling the CGI over a CMD file. And then the CGI runs normal like the VO CGI. Finding the DLL in the workdir and also no problem with the index.

into the file is

@echo off
%~dp0logout.exe

What is this -> %~dp0 <- meaning ?

Horst
User avatar
wriedmann
Posts: 3726
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Some warnings and error

Post by wriedmann »

Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Horst
Posts: 327
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

:-)

Ja too lazy, no i was not thinking on that ;-)

So the CMD open something like a sandbox and the EXE is executed.

mmmmm is it possible to use X# with ASP.NET instead of C# as language ?

Horst
User avatar
Horst
Posts: 327
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Hi
I am back again after XSharp doesnt need Vulcan RT and can use DBF its time for me to use it.
Here, years ago i posted some error and was very happy to found the answers again, because i start again to export my VO App.

But some code is not from me and i dont know how to handle it. This Logic _Cast i dont know how to change.
Does it mean like -> if empty (c) ??

IF(!LOGIC(_CAST, c))
RETURN(c)
ENDIF
// Function
FUNC UnEscape(c AS STRING) AS STRING PASCAL
LOCAL pb AS BYTE PTR
LOCAL i,j AS DWORD
LOCAL l AS DWORD

IF(!LOGIC(_CAST, c))
RETURN(c)
ENDIF

c := StrTran(c, "+", " ")

pb := String2Psz (c)
l := SLen(c)
i := j := 1

WHILE(LOGIC(_CAST, l))

IF pb = 0x25
pb[j] := BYTE(_CAST, _ToDigit(pb+i)*16 + _ToDigit(pb+(i+1)))
j++
i+=3
l -= 2
ELSE
pb[j] := pb
i++
j++
ENDIF
l--
ENDDO

pb[j] := 0
c := Left(c, SLen(String2Psz(c)))

RETURN c

Horst
Post Reply