I have this code:
VB Code:
  1. oSqlDataAdapter = New SqlDataAdapter(oSqlCommand)
  2.             Dim ComBuilder As New SqlCommandBuilder(oSqlDataAdapter)
  3.  
  4.             Dim DataRows(0) As DataRow
  5.             DataRows(0) = Data
  6.             oSqlDataAdapter.Update(DataRows)
Where Data is a DataRow.
The SQL query of my command is:
VB Code:
  1. Public ReadOnly Property EditSQL() As String
  2.         Get
  3.             Dim SQL As String
  4.  
  5.             SQL = "SELECT BookingDetail.BookingKey "
  6.             SQL &= ",ISNULL(BookingDetail.AssetKey, 0) AS AssetKey "
  7.             SQL &= ",ISNULL(BookingDetail.ClientKey, 0) AS ClientKey "
  8.             SQL &= ",ISNULL(BookingDetail.ContactKey,0) AS ContactKey "
  9.             SQL &= ",ISNULL(BookingDetail.BookedFrom, getDate()) AS BookedFrom "
  10.             SQL &= ",ISNULL(BookingDetail.BookedTo, GetDate()) AS BookedTo "
  11.             SQL &= ",ISNULL(BookingDetail.LayoutKey, 0) AS LayoutKey "
  12.             SQL &= ",ISNULL(BookingDetail.Guests, 0) AS Guests "
  13.             SQL &= ",ISNULL(BookingDetail.PrepTimeBefore, 0) AS PrepTimeBefore "
  14.             SQL &= ",ISNULL(BookingDetail.PrepTimeAfter, 0) AS PrepTimeAfter "
  15.             SQL &= ",ISNULL(BookingDetail.Comments, '') AS Comments "
  16.             SQL &= ",ISNULL(BookingDetail.UpdateUserID, 0) AS UpdateUserID "
  17.             SQL &= "FROM BookingDetail "
  18.  
  19.             Return SQL
  20.         End Get
  21.     End Property
No errors occur on the update statement, but it doesn't save to the db.

WOka