Anyone know what this means? (Updating DataGridView)

  • Thread starter Thread starter Looch
  • Start date Start date
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!
 
Looch,

Which line is causing the problem? Can you provide a stack trace?

Go to the web.config and set TraceLevel to 4. Using the debug output
viewer and capture the trace output while reproing the problem and that will
spell out exactly what is going on.

Hope this helps,


Steve
 
Looch,

Which line is causing the problem? Can you provide a stack trace?

Go to the web.config and set TraceLevel to 4. Using the debug output
viewer and capture the trace output while reproing the problem and that will
spell out exactly what is going on.

Hope this helps,

Steve













- Show quoted text -


This is a straight vb app, no web.config (unless I'm seriously missing
something, in which I'm shutting off my pc for good :D). The
ExecuteNonQuery line is throwing the error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top