Page 1 of 1
Possible culprit found for strange exception?
Posted: Fri Aug 30, 2019 8:50 pm
by FFF
Chris,
you'll remember my fight with the "Kunden" window in my _kv project i sent you some time ago. The form failed to display, while a stddatawindow, which VO uses in "File-Open", works.
Digging around, i now built a new dtaWindow from designer, using "my" basewindow class and added only two sles for kdno and name. And, i assigned directly "my" db, inherited from my baseserverclass. Then modified the shellmenu to call this form - and this works.
Now, i added a mle to the form for the free-text field of my db- and the exception is back. Remove the mle, all ok.
The point is, could it be, that there's a problem with the fieldname? The free-text field is named "Memo" (don't ask me why, did that a very long time ago)...
I ask this, as in another app, which uses the same form and serverbases, i don't see such a problem, but there the memo-field uses another name.
Possible culprit found for strange exception?
Posted: Sat Aug 31, 2019 8:29 am
by Chris
Hi Karl,
Can't tell for sure, I did a small sample here as you described it and it seems to work fine, but I might be doing something in a different way to you...
Possible culprit found for strange exception?
Posted: Sat Aug 31, 2019 9:42 am
by Karl-Heinz
Hi Karl,
i changed the name of my DBFCDX memofield to "MEMO" and there are no problems. When i open my DtaDlg window i see the content of each memo in my MLE. When i change in XIDE the dtaDlg layout and restart, there are still no problems.
regards
Karl-Heinz
Possible culprit found for strange exception?
Posted: Sat Aug 31, 2019 7:36 pm
by FFF
Karl-Heinz,
unfortunately, it's not so easy...
1) There is no problem viewing/manipulating the table via StdDatawindow, as Vo etc. use, when i open with File-Open from the StandardMdi-Sample.
2) There is no problem, if i open it with the generic Datawindow in my app, which uses my customized serverclass, but displays with a enhanced StdDatawindow based on my dtaWinbase class.
3) There is no problem, if i show a dtaWinbase using the custom server, as long as this window has no control which references the memo field.
4) There is a crash, when i open using my enhanced "dtaKunden" window based on the same dtaWinbase, using the same custom server.
So, it seems there should be a problem with dtaKunden, but that does not give an explanation for #3, nor does dtaKunden contain any "special" things. It was autogenerated x-years ago, arranged, and got a bunch of buttons to start some actions, that's all.
FTR, i use only datawindows, no dtadialogs...
One week of holiday is left, will continue hunting...
Possible culprit found for strange exception?
Posted: Wed Sep 04, 2019 12:58 pm
by FFF
Chris,
further into the "Kunden" issue: With the new build i see now on opening the window the exeption pointing to the access of my field "Straße".
Went to dbServereditor in Xide und hit export, and get "Field STRAßE has invalid values" (casing of fieldname as shown, the lowercase character is the german "sharp s", replacing "ss").
Could that create the problem? In similar apps i always named "STRASSE" and have no problem...
EDIT:
Replaced the definitions, fieldspecs etc, no go ;-(
Beschreibung : Der Index lag außerhalb des Bereichs. Er darf nicht negativ und kleiner als die Sammlung sein.
Parametername: index
Subsystem : BASE
Generischer Code : EG_EXCEPTION Exception ausgelöst durch CLR oder exteren Code
FuncSym : OOPHELPERS:IVARGET
Schwere : ES_ERROR
Kann Default : False
Kann erneut versuchen : False
Kann ersetzen : False
Aufrufreihenfolge :
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei XSharp.__Array.__GetElement(Int32[] index)
bei XSharp.__Array.get_Item(Int32[] index)
bei dbBufferedServer.FIELDGET(__Usual[] Xs$Args) in C:XIDEProjectskv4ApplicationsMSG_dbServerLibPrgdbBufferedServer.prg:Zeile 156.
bei pdb_Kunden.get_STRASSE() in C:XIDEProjectskv4ApplicationsDB_Dict_KVPrgpdb_Kunden.prg:Zeile 308.
ACCESS STRASSE AS STRING PASCAL
RETURN SELF:FieldGet(#STRASSE) // this is line 308
If i open the table with the generic FileOpen from the app, it displays & skips fine, all values and memo values are in place.
If i open the table with my generic FileOpen, which uses "my" DBServer for this table, it fails, but here accessing the memo field.
Next steps: i'll zap the table - this should take care of any table corruption, no?
If that helps, i'll do what you suggested long ago, rewrite the table by hand
If it does not, i'm finally at a loss, i think.
Possible culprit found for strange exception?
Posted: Wed Sep 04, 2019 1:35 pm
by robert
Karl,
What is the field name in the DBF file? STRAßE or STRASSE
Robert
Possible culprit found for strange exception?
Posted: Wed Sep 04, 2019 1:50 pm
by FFF
Robert,
AFAIS, prior to my modifications, STRAßE.
FTR, made a new StandardMDI-X#-runtime app. This, using File/Open, displays the field caption as "Stra?E:" (sic!)
Possible culprit found for strange exception?
Posted: Wed Sep 04, 2019 3:24 pm
by Chris
Hi Karl,
Please create a new app, add in it the code of "your" DBServer that causes the problem in your original app and load in it the same dbf file the same way as you do in your main app. If the error happens again, please zip the project and send it to me (let's try .7z format) to have a look. If it doesn't, it means that something else in the main app isa causing the problem.