Hi Guys,
I am really new to Dataset, DataTables, and all the rest of it!

This is the code i have:

VB Code:
  1. Private dsetDB As DataSet
  2.     Private daptVisit As SqlCeDataAdapter
  3.     Private dtabVisit As DataTable
  4.     Private sqlCmd As SqlCeCommand
  5.  
  6.     Private boolLoading As Boolean = True
  7.  
  8.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
  9.         If Database.openConnection() Then
  10.             Debug.WriteLine("Connection Open")
  11.         Else
  12.             Debug.WriteLine("Connection Closed")
  13.         End If
  14.  
  15.         dsetDB = New DataSet("Visit")
  16.         daptVisit = New SqlCeDataAdapter("SELECT visitID FROM currentVisit", Database.sqlConn)
  17.  
  18.         Dim cbldVisit As New SqlCeCommandBuilder(daptVisit)
  19.  
  20.         daptVisit.Fill(dsetDB, "Visits")
  21.         dtabVisit = dsetDB.Tables("Visit")
  22.  
  23.         lblVisit.Text = "VisitID"
  24.  
  25.         textVisit.DataBindings.Add("Text", dtabVisit, "visitID")
  26.  
  27.         boolLoading = False
  28.     End Sub
  29.  
  30.     Private Sub textVisit_Validated1(ByVal sender As Object, ByVal e As System.EventArgs) Handles textVisit.Validated
  31.         Me.BindingContext(dtabVisit).EndCurrentEdit()
  32.     End Sub

Now i don't know exactly how all of this code works, i found some code in a book and have changed it so that it is relevant to my DB. Now i keep gettin an error on the line

VB Code:
  1. textVisit.DataBindings.Add("Text", dtabVisit, "visitID")

and as i am completely new to this i dont know why this is happening or how to fix it, so could someone please help me!

The error i am getting is ArgumentNullException - An error message cannot be displayed because an optional resource assembly containing it cannot be found

If anybody could help me i would greatly appreciate it.

Thanks in advance for any help