FillByPrimaryKey weird behavior


Author
Message
Andria Jensen
Andria Jensen
StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have a base form, on which I am setting the form's business object, and calling FillByPrimaryKey during the Form_Activated event.

This has usually worked fine for me except in the instance I am looking at today which has me a little stumped.  On my form some values are appearing correctly and some are not.  So, I stepped to the line in the code where the Fill is happening to check the contents of the BO.  Well, the first time it's called the Fill only retrieves some of the values...But if I execute that same exact line (FillByPrimaryKey) over again with no action between the two calls it returns back all of my values correctly. 

So, basically...if I call FillByPrimaryKey once it returns back some but not all of my values, some are still zeroes or blanks.  If I recall it a second time directly after calling it the first, it fills everything correctly.

I realize this sounds stupid but I have done it several times now.  I have no idea what could be causing this, so if you guys have any idea or could just point me to some things to check that would be great.  Thanks!

Andria Jensen
Andria Jensen
StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)StrataFrame User (422 reputation)
Group: Forum Members
Posts: 336, Visits: 497
OK....I am going to smack myself now.  I knew something weird was going on.  I checked for any events that could have possibly been getting raised with the Fill happened and finally found a Navigated event that was calling some other code.  Anyway, about 5 levels deeper it was calling some Multilingual code which had a bug in it and was changing the values of the edit controls.  I knew it would end up being my bug, I just didn't know where to look!  I'm glad I finally stumbled across it. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search