Some warnings and error

This forum is meant for questions and discussions about the X# language and tools
FFF
Posts: 1584
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Some warnings and error

Post by FFF »

Horst,
* try File(myWorkDir ()+ IDC_PathDbfSys + "UserOnline.cdx")
* and, what if you hardcode your path to the cdx file?

It's somewhat unfortunate, that SetIndex returns only a flag, and no further info why it might fail

K. (without -Heinz ;) )
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Hallo Karl

File () is true


i dont understand that ? what do you wanna say ?
* and, what if you hardcode your path to the cdx file?

Horst
FFF
Posts: 1584
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Some warnings and error

Post by FFF »

Horst,
false for SetIndex doesn't tell why it fails, so, i suggested to check, if the file is found at all - two ways to do this, either with File(), -> with true it seems the fail is NOT dependent on your concatenated path.
The other option to exclude problems with myWorkDir or a typo in your IDC_PathDbfSys would have been the explicit hardcoded path...

If the file is found, but not used, i'm at a loss, now the gurus have to help ;)
K.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Some warnings and error

Post by robert »

Karl, Horst,

If an error occurs during SetIndex then you should check the oDbServer:Status property. It should contain a hyperlabel with the error information that was stored by the RDD system.
Also the oDbServer:ErrInfo property should have the last error object.

If you subclass the server object and implement the method

METHOD __GenerateStatusHL( oError AS Error) AS HYPERLABEL
Then you will see all errors that occur.
Even when for example one operation generates 2 errors. In that case the status and ErrInfo properties will have the last error, but inside __GenerateStatusHL you will see all errors.
Make sure to call Super:__GenerateStatusHL or the status and ErrInfo properties will not be set.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
wriedmann
Posts: 3765
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Some warnings and error

Post by wriedmann »

Hi Horst,

this application uses the Core dialect?

Could it the that the Vulcan runtime is not initalized?

Please try to add this code:

Code: Select all

class VulcanLoader
static method InitVulcan() as void
	local t as Type
	local mi as System.Reflection.MethodInfo 

	t := typeof(VulcanLoader)
	mi := t:GetMethod( "InitVulcan" ) 
	Vulcan.Runtime.State.AppModule := mi:Module 

end class
and to call

Code: Select all

VulcanLoader.InitVulcan()
before opening the DBF.

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

Some warnings and error

Post by Chris »

Hi Horst,

In addition to what everybody else said, please also make sure that all necessary dlls are available for your app at runtime. Apart for VulcanRT.dll, VulcanRTFuncs.dll and VulcanRDD.dll, you also need VulcanDBFCDX.dll and VulcanMacroCompiler.dll for the index support.

Also is it an .exe that gets executed, or does your app consist of a dll only that gets called? If it's a dll only, then you will need to include the code Wolfgang provided, for initialization of the runtime.

Chris
Chris Pyrgas

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

Some warnings and error

Post by Horst »

Hallo Robert

I try to read the dbserver:Status i did:
odbUserOnline:= dbServer {myWorkDir ()+ IDC_PathDbfSys+ "UserOnline.dbf",TRUE,FALSE,"DBFCDX"}

ohyper := odbuseronline:status
if ohyper != NULL_OBJECT
myerr("kein Object")
else
myerr ("Object")
myerr("hyp")
myerr(oHyper:Caption)
myerr(oHyper:Description)
myerr(oHyper:HelpContext)
myerr("hypend")
endif
but on the line with the caption comes
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

i am expecting a string
Sorry i dont know to handle that.
Horst
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Chris , Wolfgang

I am using the VO Dialekt.
I was looking for the DLL's , they are in the GAC Folder on the right place.

I was including this Loader but no better result

Horst
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Some warnings and error

Post by robert »

Horst,

Your oHyper check is the wrong way:

Code: Select all

if ohyper != NULL_OBJECT
should be

Code: Select all

if ohyper == NULL_OBJECT
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Hallo Robert

I need glases ;-)

Now comes - 33 DBSERVER: Data type error - for Caption and Descrition.

Why , there is no error before ? Im using CDX so i dont realy need SetIndex. It shoud open automatic.

Horst
Post Reply