xsharp.eu • Some warnings and error - Page 7
Page 7 of 9

Some warnings and error

Posted: Sat Oct 14, 2017 1:08 pm
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 ;) )

Some warnings and error

Posted: Sat Oct 14, 2017 1:24 pm
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

Some warnings and error

Posted: Sat Oct 14, 2017 3:32 pm
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.

Some warnings and error

Posted: Sat Oct 14, 2017 4:01 pm
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

Some warnings and error

Posted: Sat Oct 14, 2017 4:02 pm
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

Some warnings and error

Posted: Sun Oct 15, 2017 3:52 pm
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

Some warnings and error

Posted: Tue Oct 17, 2017 3:54 pm
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

Some warnings and error

Posted: Tue Oct 17, 2017 4:04 pm
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

Some warnings and error

Posted: Tue Oct 17, 2017 4:17 pm
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

Some warnings and error

Posted: Tue Oct 17, 2017 4:41 pm
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