Kevin Lingofelter
|
|
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!
|
|
|
Kevin Lingofelter
|
|
Group: Forum Members
Posts: 77,
Visits: 804
|
well...not sure what the deal was. I deleted the grid and rebuilt the settings and now it's working. Sorry to clog the forums with stuff not SF related...
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
You're not clogging anything. That is what the forum is for. If you start running into a problem again let me know. I know that the Infragistics grid can be finicky at times when interacting with an ADO.NET data table.
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
hi,
found this thread and i'm also having problems with save. I'm trying to add a new record everything seems to work ok, when i click new i get an empty form with a ID of -1 but when i click save nothing happens the form just hang with no error given. i thought i was doing something wrong so i tried the same step in the sample project and same thing. no error the form just hangs. Have you ever experienced something like this?
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
No. But the first thing that you need to do is place the application in debug mode and see what is being executed on the server. To do this you need to set the debug mode and file in the AppMain of the project. It will look like this: MicroFour.StrataFrame.Data.DataBasics.DataSources(0).SetDebugOn( "c:\temp\mydebugfile.html", True)Place the above code right after the ConnectionManager.SetConnections() in the SetDataSources() method in AppMain. This will create an HTML file with every SELECT, INSERT, UPDATE, and DELETE call made through the framework during the session. The file is updated before it is actually executed on the server, so even if it hangs, it should show up in the file. The next question is what type of database are you using when this happens (also include what version)? Run the app in debug mode first and see if it clues you in to what is going on then we can go from there.
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
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: '12341-2345' [DbType: AnsiString | Size: 10 | Direction: Input | SourceColumn: Zip | SourceVersion: Current]
@Telephone: '' [DbType: AnsiString | Size: 14 | Direction: Input | SourceColumn: Telephone | SourceVersion: Current]
this is the argument that happens when i try to save, I'm usiing SQL 2000 with SP4 on Windows 2003 Server, the form is a basic SF Maintenance form. for the Zip and the telephone i'm using Mask Texboxes, each set for their respective Mask, the zip is sent to the BO but not the telephone number i entered (123)123-1234 as the phone number but the Statement above never received it, i verified that the business object is tied to the mask box and that the proper field is also set. Help.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Check the BindingUpdateMode property on the MaskedTextBox for the phone number and make sure it is set to OnPropertyChanged and try again... we just use the .NET DataBindings collection on the control to move the data back and forth, so if the binding is configured properly, everything should work. Also, if you step into debug, check the DataBindings collection on the masked text box and make sure its count is greater than 0.
|
|
|
Trent Taylor
|
|
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 . Let me know.
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
html>
1
|
2006-06-06 11:44:20.453
|
General Command Settings
|
Text
|
System.Data.SqlClient.SqlCommand
|
Data Source=SVRSQL1;Initial Catalog=DiscoverSuccess;User ID=**;Asynchronous Processing=True
|
False
|
Command Settings
|
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
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: LocationName | SourceVersion: Current]
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: Address1 | SourceVersion: Current]
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: Address2 | SourceVersion: Current]
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: City | SourceVersion: Current]
|
'te' [DbType: AnsiString | Size: 2 | Direction: Input | SourceColumn: State | SourceVersion: Current]
|
'12345-1234' [DbType: AnsiString | Size: 10 | Direction: Input | SourceColumn: Zip | SourceVersion: Current]
|
'(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
|
|
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?
|
|
|