StrataFrame Forum

Why didn't this record save?

http://forum.strataframe.net/Topic7136.aspx

By Peter Jones - 2/22/2007

Hi,

Please refer to the attached screen shot. I have a BO with four columns each with a default value (refer code). When I click New in the Form I get a new record populated with the required default values however, when I click Save, I get an error saying there is no value provided for AGTActive.

While the above is my current concern I did notice earlier that "it seemed" as though the user has to change focus from field A to field B before the contents of field A are acknowledged. I saw this when I didn't have a default value for AGTName and, when I created a new record, I keyed in value and clicked Save. This caused an error same as above but saying AGTName cannot be Null however the screen clearly showed what I just typed in.

Cheers, Peter

By StrataFrame Team - 2/23/2007

How is the AGTActive property configured?  Do you have a Null Value Option configured on the field within the business object?
By Peter Jones - 2/23/2007

Hi Ben,

AGTActive column in the database does not permit Null values but the value being saved is True (notice the default code set up and the tick on the grid) so it isn't Null.

Cheers, Peter

By Peter Jones - 2/25/2007

Hi Ben,

I'm just not sure what happened here but this now works. I have been messing around in the BO settings so I must have had 'something' incorrectly configured.

Cheers, Peter

By StrataFrame Team - 2/26/2007

That's strange... if you can reproduce it again, then you can turn on debugging on the data source and see what the actual SQL code is that is being executed on the database.  But, then again, if it's working, then you really don't have a need to break it again just so you can reproduce it, huh Wink
By Peter Jones - 2/26/2007

Hi Ben,

"Turn on debugging" Now that sounds like a switch I would like to know how to turn on and off......

Cheers, Peter

By StrataFrame Team - 2/27/2007

Well, what would you like to debug? BigGrin

If you want to debug your data sources, then in the AppMain.vb file, at the bottom of the SetDataSources() method, you can put this code for each of the data sources you have configured:

MicroFour.StrataFrame.Data.DataBasics.DataSources("").SetDebugOn("C:\Debug.html", True)

The string parameter is the path to the HTML output file for the data, and the True tells it to overwrite the file that is there each time you run the program.  The output file is a nice, HTML formatted debug file containing all sorts of information on each command that is executed.