I have a table with several fields.
All but 2 of the fields have a default value specified in the Table.
I was assuming that I only needed to specify the fields I want changed and I did not have to specify each field value. (Isn't That the purpose of a default value?)
If i do not specify each field I can an error saying the field can not be null.
Below is my code. Can anyone show me the erros of may ways.
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
		
			
		
		
	
				
			All but 2 of the fields have a default value specified in the Table.
I was assuming that I only needed to specify the fields I want changed and I did not have to specify each field value. (Isn't That the purpose of a default value?)
If i do not specify each field I can an error saying the field can not be null.
Below is my code. Can anyone show me the erros of may ways.
			
				VB.NET:
			
		
		
		         sql = "Select [Tool Crib].* From [Tool Crib]"
        Try
            m_cnToolCrib.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & PathCMDB()
            m_cnToolCrib.Open()
            m_daToolCrib = New OleDb.OleDbDataAdapter(sql, m_cnToolCrib)
            m_cbToolCrib = New OleDb.OleDbCommandBuilder(m_daToolCrib)
            m_cbToolCrib.QuotePrefix = "["
            m_cbToolCrib.QuoteSuffix = "]"
            m_daToolCrib.Fill(m_dtToolCrib)
            drNewRow("Type ID") = (TryCast(cboToolSetupAvailTools.EditValue, myItemData)).ItemData.ToString()
            For Each row As CategoryRow In vgToolParameters.Rows
                Dim childRows As VGridRows = row.ChildRows
                For Each childRow As EditorRow In childRows
 
                    If (UCase(childRow.Properties.Caption) = "COLOR") Then
                        drNewRow("Color") = ColorTranslator.ToOle(childRow.Properties.Value)
                    Else
                        drNewRow(childRow.Properties.Caption) = childRow.Properties.Value
                    End If
                Next childRow
            Next row
            m_dtToolCrib.Rows.Add(drNewRow)
            m_daToolCrib.Update(m_dtToolCrib)
        Catch ex As Exception
            MessageBox.Show("AddRecordToToolCrib: " & ex.Message)
        End Try
        m_dtToolCrib.Dispose()
        m_daToolCrib.Dispose() 
	 
 
		 
 
		 
 
		