L
Looch
Hi all,
Here's the code I'm using:
Dim sqlCnn As New SqlConnection(cnn)
Dim sqlCmd As New SqlCommand("Update AMS.dbo.Call_Log Set
Status = @status, UPSTrack = @ups where TicketNumberActual =
@ticketnumber", sqlCnn)
sqlCmd.Parameters.AddWithValue("@ticketnumber",
SqlDbType.BigInt.ToString())
sqlCmd.Parameters(0).Value =
dgConsumables.Columns("TicketNumberActual")
sqlCmd.Parameters.Add("@status", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(1).Value = dgConsumables.Columns("Status")
sqlCmd.Parameters.Add("@ups", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(2).Value = dgConsumables.Columns("UPSTrack")
sqlCnn.Open()
sqlCmd.ExecuteNonQuery()
sqlCnn.Close()
And I'm getting this error:
No mapping exists from object type
System.Windows.Forms.DataGridViewTextBoxColumn to a known managed
provider native type.
I think it has to do with not specifying the cell's value, but that's
just a guess.
Any idea what that means?
Thanks!
Here's the code I'm using:
Dim sqlCnn As New SqlConnection(cnn)
Dim sqlCmd As New SqlCommand("Update AMS.dbo.Call_Log Set
Status = @status, UPSTrack = @ups where TicketNumberActual =
@ticketnumber", sqlCnn)
sqlCmd.Parameters.AddWithValue("@ticketnumber",
SqlDbType.BigInt.ToString())
sqlCmd.Parameters(0).Value =
dgConsumables.Columns("TicketNumberActual")
sqlCmd.Parameters.Add("@status", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(1).Value = dgConsumables.Columns("Status")
sqlCmd.Parameters.Add("@ups", SqlDbType.NVarChar, 50)
sqlCmd.Parameters(2).Value = dgConsumables.Columns("UPSTrack")
sqlCnn.Open()
sqlCmd.ExecuteNonQuery()
sqlCnn.Close()
And I'm getting this error:
No mapping exists from object type
System.Windows.Forms.DataGridViewTextBoxColumn to a known managed
provider native type.
I think it has to do with not specifying the cell's value, but that's
just a guess.
Any idea what that means?
Thanks!