xsharp.eu • Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error
Page 1 of 1

Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error

Posted: Tue Sep 17, 2019 5:25 pm
by jjgregg
I finally managed to get our main applications upgraded to VO 2.8 sp4 working with dbf files, the idea is to now migrate dBase data to SQL prior to moving o X# or C#.

Something strange is happening, we got a runtime error when opening our Agents Screen which is a simple datawindow, Agents file utilizes another data server and has worked without problems.

Now a runtime error occurs when opening the Agents Screen, right in the INIT method:

CLASS _Agent_Scrn INHERIT DATAWINDOW

CLASS Agent_Scrn INHERIT _Agent_Scrn

METHOD INIT(oWindow,iCtlID,oServer) CLASS Agent_Scrn
LOCAL oFileSpec as FILESPEC
LOCAL oDBServer as SPONSOR_DATA
LOCAL oApp as MyApp
oApp := SysObject()


oFileSpec := FileSpec{ AppSetDir( oApp:UserDir, "AGEN"+PadL( oApp:UserNRegion,2,'0')+".DBF" ) }
self:Use( SPONSOR_DATA{ oFileSpec:FullPath } ) <<== ACCESS RUNTIME ERROR:

GenCode 16-> No exported variable
SubSystem -> BASE
FuncSym -> IVARPUT FuncPtr 0x00000000
Arg. No 2 -> AUTOLAYOUT
CanSubstitute -> NIL

i can't locate what may be causing the error but it prevents the window from opening and the application is aborted.

What's going on?
Thanks
John

Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error

Posted: Tue Sep 17, 2019 11:04 pm
by Jamal
How do you know that SPONSOR_DATA{ oFileSpec:FullPath } is a valid dbserver object? You should really check first before passing it to the self:Use(...).

Also, do you have Prevent Auto Layout true or false?

Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error

Posted: Wed Sep 18, 2019 2:51 pm
by jjgregg
Hi Jamal, I really appreciate your help. I have to deliver the VO 2,8 sp4 upgrade of our systems today and issues like this one are really hard to address.
I don't look at the Autolayout settings, although these were mentioned in the error message text for some reason.
I'll check to see if the entity is a valid dbserver and will let you know what develops.
This is very strange.
It's some form of corruption very deep inside the language source codes.
Regards,
John

Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error

Posted: Wed Sep 18, 2019 9:01 pm
by jjgregg
Hi Jamal,
I found out there were some data field names that were not acceptable in a couple of the dbase servers, and I had to touch and save each data server because under VO 2.8 sp4, the Server Class declarations now declare all server methods.
But... now I am having an odd problem, many screens are giving error "Method: has been strongly typed but has not been declared in the class"

There are many many lines with this error, an example of one:
oGroup:NOTES := AllTrim( oDCmNOTES:TextValue )

The workaround is declaring the SELF variables and using FIELDGET and FIELDPUT to read / write field information!

oGroup:FIELDPUT(#NOTES, AllTrim( self:oDCmNOTES:TextValue )

This line now compiles without errors, I don't know if it will translate into a runtime error but I have a feeling SOMETHING IS NOT RIGHT in my VO 2.8 sp4 environment. The field access / assign server methods are not functioning.

What's going on?
Thanks,
John

Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error

Posted: Wed Sep 18, 2019 9:14 pm
by jjgregg
Jamal or anyone that can help...
Now I'm having the error message "Method: has been strongly typed but has not been declared in the class" in all screens at the data server access and assign methods.
In other words, basic data assignment no longer works: at all data access or assign points
Example: nEvalAgeEv := SELF:oOwner:oInsured:PEVALAGEEV
This line now gives an error message.
The quick fix seems to be: nEvalAgeEv := SELF:oOwner:oInsured:FIELDGET(#PEVALAGEEV)

Now that line does not show an error but by using FIELDGET and FIELDPUT statements, we loose the Compiler field verification correction messages, all errors have to be found at runtime!!!!!!

What the heck is going on?
Rgds,
John

Upgraded from VO2.7b to VO2.8 sp4, now getting Access Error

Posted: Thu Sep 19, 2019 11:12 am
by SHirsch
Hi John,

you have to declare your strongly typed access and assign or methods in class declaration

Code: Select all

CLASS DBBNV INHERIT db_StdServer
   DECLARE ACCESS NUTZER       <- this
   DECLARE ASSIGN NUTZER       <- and this
ACCESS NUTZER AS STRING PASCAL CLASS DBBNV
 RETURN SELF:FieldGetSym(#NUTZER)
ASSIGN NUTZER(uValue AS STRING) AS LOGIC PASCAL CLASS DBBNV
 RETURN SELF:FieldPutSym(#NUTZER, uValue
......
Stefan