fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Possible culprit found for strange exception?

Possible culprit found for strange exception? 2 weeks 4 days ago #10470

  FFF's Avatar Topic Author FFF Away Posts: 683
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.
Regards
Karl

Please Log in or Create an account to join the conversation.

Possible culprit found for strange exception? 2 weeks 4 days ago #10478

  Chris's Avatar Chris Offline Posts: 1341
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...
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Possible culprit found for strange exception? 2 weeks 3 days ago #10485

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 356
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

Please Log in or Create an account to join the conversation.

Possible culprit found for strange exception? 2 weeks 3 days ago #10490

  FFF's Avatar Topic Author FFF Away Posts: 683
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...
Regards
Karl

Please Log in or Create an account to join the conversation.

Possible culprit found for strange exception? 1 week 6 days ago #10546

  FFF's Avatar Topic Author FFF Away Posts: 683
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:\XIDE\Projects\kv4\Applications\MSG_dbServerLib\Prg\dbBufferedServer.prg:Zeile 156.
bei pdb_Kunden.get_STRASSE() in C:\XIDE\Projects\kv4\Applications\DB_Dict_KV\Prg\pdb_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.
Regards
Karl

Please Log in or Create an account to join the conversation.

Last edit: by FFF.

Possible culprit found for strange exception? 1 week 6 days ago #10549

  robert's Avatar robert Offline Posts: 1158
Karl,

What is the field name in the DBF file? STRAßE or STRASSE

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Possible culprit found for strange exception? 1 week 6 days ago #10551

  FFF's Avatar Topic Author FFF Away Posts: 683
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!)
Regards
Karl

Please Log in or Create an account to join the conversation.

Last edit: by FFF.

Possible culprit found for strange exception? 1 week 6 days ago #10558

  Chris's Avatar Chris Offline Posts: 1341
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.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

  • Page:
  • 1