Link to home
Start Free TrialLog in
Avatar of PeterFrb
PeterFrbFlag for United States of America

asked on

VB.Net: Form with DataGridView control failing to close

I have a dataGrid control in my VB.Net form, which has been failing to work.  Right now, to test the form, I simply have the one control that is bound to an Access dataset.  When I first open the form, I see the data in the control, which I can edit.  Regardless of whether I edit it or not, each time I try to close the form it both refuses to close and presents me with an error.  The only way I've found to close the form is to go into the Task Manager and kill the process.  I screencaptured the two errors I'm getting.  

I've reproduced the code below: the only thing there is the generic process that VB.Net automatically generates to populate a control with a predesignated dataset.  I also have an attachment of the two error messages I get, which persist in iteration after iteration of the same genre of error.  Hope you can help.

Thanks, ~Peter Ferber

Public Class DataGrid_Control_Form

    Private Sub DataGrid_Control_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'Data_DefinitionDataSet1.tbl_Role_Outfield' table. You can move, or remove it, as needed.
        Me.Tbl_Role_OutfieldTableAdapter.Fill(Me.Data_DefinitionDataSet1.tbl_Role_Outfield)

    End Sub
End Class

Open in new window


User generated image
ASKER CERTIFIED SOLUTION
Avatar of Jesus Rodriguez
Jesus Rodriguez
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PeterFrb

ASKER

You point is spot on, Jesus; and the conflict was Null values in the dataset, which I changed, via a query, to zero-length strings.
By changing my null values to zero-length strings, I am now able to run the program and close it on command!  Woo hoo!  Many thanks.  ~Peter
Always welcome my friend.