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

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
User avatar
jjgregg
Posts: 25
Joined: Thu Jul 19, 2018 6:16 pm

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

Post 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
Jamal
Posts: 320
Joined: Mon Jul 03, 2017 7:02 pm

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

Post 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?
User avatar
jjgregg
Posts: 25
Joined: Thu Jul 19, 2018 6:16 pm

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

Post 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
User avatar
jjgregg
Posts: 25
Joined: Thu Jul 19, 2018 6:16 pm

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

Post 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
User avatar
jjgregg
Posts: 25
Joined: Thu Jul 19, 2018 6:16 pm

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

Post 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
User avatar
SHirsch
Posts: 286
Joined: Tue Jan 30, 2018 8:23 am
Location: Germany

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

Post 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
Post Reply