Trouble with save


Author
Message
Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
Hello,

I am beating my brain trying to figure out what I did wrong. I am using an infragistics grid. I am setting the isListSource property to true in the BO and binding the BO to the grid.

In the AfterRowUpdate event of the grid, I am calling BO.Save();

This works fine on another form. Records are added, deleted and modified just peachy, but on this one form, the save method gives me this error:

"The CurrentRow could not be evaluated because the CurrentRowIndex is out of range.  Business object record count: 1.  CurrentRowIndex: -1."

Does this error give you any clues as what I'm missing?

Thanks!

Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Vince,

Did you use an SF masked textbox for the telephone?  If you did, make sure the BindingField property is set.  I am sure that you already know this, but just in case, there are properties on a masked text box to determine whether or not you want to include the making characters in the save.  This isn't your problem, just thought I would metion it.

So check to make sure that you have the BindingField and BusinessObject properties set for the telephone.  If you don't see those properties, then it is not an SF control Smile

Let me know.

vblain
vblain
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 31
html>















































































































Command #:



1

Timestamp:



2006-06-06 11:44:20.453





General Command Settings

Command Type:



Text

Object Type:



System.Data.SqlClient.SqlCommand

Connection String:



Data Source=SVRSQL1;Initial Catalog=DiscoverSuccess;User ID=**;Asynchronous Processing=True

Transaction:



False



Command Settings

CommandText:



INSERT INTO [dbo].[Location] ([LocationName], [Address1], [Address2], [City], [State], [Zip], [Telephone]) VALUES (@LocationName, @Address1, @Address2, @City, @State, @Zip, @Telephone);

SELECT [id] FROM [dbo].[Location] WHERE id = SCOPE_IDENTITY();





Command Parameters

@LocationName:



'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: LocationName | SourceVersion: Current]

@Address1:



'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: Address1 | SourceVersion: Current]

@Address2:



'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: Address2 | SourceVersion: Current]

@City:





'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: City | SourceVersion: Current]

@State:



'te' [DbType: AnsiString | Size: 2 | Direction: Input | SourceColumn: State | SourceVersion: Current]

@Zip:



'12345-1234' [DbType: AnsiString | Size: 10 | Direction: Input | SourceColumn: Zip | SourceVersion: Current]

@Telephone:



'(123) 123-1234' [DbType: AnsiString | Size: 14 | Direction: Input | SourceColumn: Telephone | SourceVersion: Current]





well the telephone is being passed now, but it's still hanging, the masked textbox are the SF MaskedTextBox. it just seems that the business object is not executing the statement. But i can even step through once i click save the app become unresponsive.

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hrm... what version do you have installed, Vince?

1.4.1 pre-release or 1.4?

There could be an issue with the ListChanged event firing during the save (which causes the app to lock because the main thread is sleeping)... Do you have the business object on a grid using the BusinessBindingSource?

vblain
vblain
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 31
i'm using 1.4.1 currently, the form is just a basic maintenance form no grid, i dropped SF textbox for each fields


StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I'm checking right now, Vince to see if I can reproduce it.
vblain
vblain
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 31
in the sampl project provided, the Customer Maintenance Form does the exact same thing, when saving it just hangs
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Does it only hang when you add a new record, or does it hang when you edit an existing record and save it?
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I found it, Vince.  I'm fixing it right now and I'll get you the install once I get it built.
vblain
vblain
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 31
you guys are awesome, can't get any better service then here
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
OK, Vince, fixed the problem and re-created the install.  The latest version is available within the MyAccount area of the website and from https://www.strataframe.net/downloads/StrataFrame.zip

Basically, when the new PK was retrieved after an insert, the internal DataTable would raise its ListChanged event, and the business object would try to raise its property descriptor changed event (for 2-way binding) and the binding would try to refresh its value.  But, the binding resides on the main thread, and the main thread is blocked while the update threads push the data to SQL Server, so the whole thing froze.

Give that new install a shot Smile

vblain
vblain
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 31
everything working 100%. Thank you again for your top of the line support.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
That's what we're here for Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Kevin Lingofelter - 19 Years Ago
Kevin Lingofelter - 19 Years Ago
Trent L. Taylor - 19 Years Ago
vblain - 19 Years Ago
Trent L. Taylor - 19 Years Ago
vblain - 19 Years Ago
StrataFrame Team - 19 Years Ago
Trent L. Taylor - 19 Years Ago
                     html>
body {margin: 13px 13px 13px 13px; background-color:...
vblain - 19 Years Ago
                         Hrm... what version do you have installed, Vince? 1.4.1 pre-release...
StrataFrame Team - 19 Years Ago
                             i'm using 1.4.1 currently, the form is just a basic maintenance form...
vblain - 19 Years Ago
                                 I'm checking right now, Vince to see if I can reproduce it.
StrataFrame Team - 19 Years Ago
                                     in the sampl project provided, the Customer Maintenance Form does the...
vblain - 19 Years Ago
                                         Does it only hang when you add a new record, or does it hang when you...
StrataFrame Team - 19 Years Ago
                                             I found it, Vince. I'm fixing it right now and I'll get you the...
StrataFrame Team - 19 Years Ago
                                                 you guys are awesome, can't get any better service then here
vblain - 19 Years Ago
                                                     OK, Vince, fixed the problem and re-created the install. The latest...
StrataFrame Team - 19 Years Ago
                                                         everything working 100%. Thank you again for your top of the line...
vblain - 19 Years Ago
                                                             That's what we're here for :)
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search