I have added a access database to my project and created the connection, dataset and all via the wizard. But when I run the program I encounter error

An unhandled exception of type 'System.TypeInitializationException' occurred in System.Data.dll
Additional information: The type initializer for '<Module>' threw an exception.

From from the Fill() function;

 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
         Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
         Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
         Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, True)> _
        Public Overridable Overloads Function Fill(ByVal dataTable As _Acc_Booklist_Dataset.RegisterDataTable) As Integer
            Me.Adapter.SelectCommand = Me.CommandCollection(0)
            If (Me.ClearBeforeFill = True) Then
                dataTable.Clear()
            End If
            Dim returnValue As Integer = Me.Adapter.Fill(dataTable) '<< ERROR HIGHLIGHTED HERE
            Return returnValue
        End Function

the Me.Adapter.Fill(dataTable) returns a value of zero. This kind of exception is new to me and I dont know where to start even. I do not think it is related to any form coding.
Thanks in advance :)

Yes the return value is zero so im assuming something was returned. and i ahve updated the question so that you can see the table feilds

I think you have to specify what or from which field you are referring to in that table because I think your code indeed will return zero or exception because you just specified the table but didn't tell it to look in which field in a table.

This article has been dead for over six months. Start a new discussion instead.