Calling Add on a Business Object


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Ok, I found my notes Tongue

I am calling a child form from a listview, in the childform.Load() I did the following:

' Force the BO assignment here to fix a problem of the BO.Add() not working properly.

Me.lstItemService.BusinessObject = Me.bizSC_AppliancesItems1

I don't know why was this happening and it was very difficult to reproduce in the sample application, so since this worked, I just leave it and moved on to new issues.Hehe

Edhy Rijo

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Is this a child BO? . . . so let me know if this is a child BO.

Yes. 

The DB is accessible.  I have closed and restarted VS several times.  Other similar classes and BOs work just fine (all other applications are hitting the DB without issues).  I'll take a closer look at the parent-child relationship.

Thanks!
Bill

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Bill Cunnien (10/24/2008)
Does this mean anything?

_COMPlusExceptionCode = -532459699

This is form google:

_COMPlusExceptionCode = -532459699

this error usally occurs when sql connection timeout or if the sql server is down.

i got the same error when i tried to access the webservice which is located in another webserver. (That webserver was down at that time).

Maybe you need to close VS and test again.

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Bill,

Is this a child BO? I had a similar situation before where the child BO was not creating the new row, don't remember what I did Hehe, but can look at my project to refresh my memory if needed, so let me know if this is a child BO.

Edhy Rijo

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Does this mean anything?

_COMPlusExceptionCode = -532459699

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Thanks, Greg.  As I walk the code it always bombs as it is setting the first default value.  The current row index evaluates as -1.  If I comment out the default values, the Add() command still ends up bombing on the get_CurrentRow() method of the BusinessLayer.  For some reason the BO is not making a new row in the data table.  I will keep testing...maybe a light bulb will go off for me, too.  Hehe
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Bill,



It's hard to tell what might going on with just the call stack. Try setting a break point in SetDefaultValues and step through until you get the error. Set a watch on the current row index. The light bulbs gone off for me many times by just doing that.
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
When I call the add method of the business object, I am not getting a new record. 

The CurrentRow for table '[dbo].[ProdWOEquipment]' could not be evaluated because the CurrentRowIndex is out of range.  Business object record count: 0.  CurrentRowIndex: -1.

Here is the call stack:


> MicroFour StrataFrame Business.dll!MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentRow() Line 1790 Basic
  AspireModel.dll!Aspire.Model.ProductionWorkOrderEquipmentBO.createby.set(int value = 1) Line 419 + 0x8 bytes C#
  AspireModel.dll!Aspire.Model.ProductionWorkOrderEquipmentBO.ProductionWorkOrderEquipmentBO_SetDefaultValues() Line 77 + 0x1c bytes C#
  MicroFour StrataFrame Business.dll!MicroFour.StrataFrame.Business.BusinessLayer.raise_SetDefaultValues() Line 1662 + 0xe bytes Basic
  MicroFour StrataFrame Business.dll!MicroFour.StrataFrame.Business.BusinessLayer.OnSetDefaultValues() Line 1673 + 0xa bytes Basic
  MicroFour StrataFrame Business.dll!MicroFour.StrataFrame.Business.BusinessLayer.NewRow() Line 6047 + 0xb bytes Basic
  MicroFour StrataFrame Business.dll!MicroFour.StrataFrame.Business.BusinessLayer.Add(Boolean CheckSecurity = True) Line 7283 + 0xa bytes Basic
  MicroFour StrataFrame Business.dll!MicroFour.StrataFrame.Business.BusinessLayer.Add() Line 7254 + 0xf bytes Basic

The odd things is that I use the same kind of code elsewhere and it runs beautifully.  There is something different about this BO's class.  I am just not seeing it.  I'll keep looking, but if anyone has some tips or tricks to share, I'd appreciate it.

Bill

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