Anyone know what this means? (Updating DataGridView)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Looch

    Anyone know what this means? (Updating DataGridView)

    Hi all,

    Here's the code I'm using:

    Dim sqlCnn As New SqlConnection(c nn)
    Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
    Status = @status, UPSTrack = @ups where TicketNumberAct ual =
    @ticketnumber", sqlCnn)
    sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
    SqlDbType.BigIn t.ToString())
    sqlCmd.Paramete rs(0).Value =
    dgConsumables.C olumns("TicketN umberActual")
    sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
    sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
    sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
    sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
    sqlCnn.Open()
    sqlCmd.ExecuteN onQuery()
    sqlCnn.Close()

    And I'm getting this error:

    No mapping exists from object type
    System.Windows. Forms.DataGridV iewTextBoxColum n 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!

  • PlatinumBay

    #2
    Re: Anyone know what this means? (Updating DataGridView)

    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" <lucianoj2005@y ahoo.comwrote in message
    news:1181076371 .779961.99860@m 36g2000hse.goog legroups.com...
    Hi all,
    >
    Here's the code I'm using:
    >
    Dim sqlCnn As New SqlConnection(c nn)
    Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
    Status = @status, UPSTrack = @ups where TicketNumberAct ual =
    @ticketnumber", sqlCnn)
    sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
    SqlDbType.BigIn t.ToString())
    sqlCmd.Paramete rs(0).Value =
    dgConsumables.C olumns("TicketN umberActual")
    sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
    sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
    sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
    sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
    sqlCnn.Open()
    sqlCmd.ExecuteN onQuery()
    sqlCnn.Close()
    >
    And I'm getting this error:
    >
    No mapping exists from object type
    System.Windows. Forms.DataGridV iewTextBoxColum n 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!
    >

    Comment

    • Looch

      #3
      Re: Anyone know what this means? (Updating DataGridView)

      On Jun 5, 5:40 pm, "PlatinumBa y" <stevan...@comm unity.nospamwro te:
      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" <lucianoj2...@y ahoo.comwrote in message
      >
      news:1181076371 .779961.99860@m 36g2000hse.goog legroups.com...
      >
      >
      >
      Hi all,
      >
      Here's the code I'm using:
      >
      Dim sqlCnn As New SqlConnection(c nn)
      Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
      Status = @status, UPSTrack = @ups where TicketNumberAct ual =
      @ticketnumber", sqlCnn)
      sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
      SqlDbType.BigIn t.ToString())
      sqlCmd.Paramete rs(0).Value =
      dgConsumables.C olumns("TicketN umberActual")
      sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
      sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
      sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
      sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
      sqlCnn.Open()
      sqlCmd.ExecuteN onQuery()
      sqlCnn.Close()
      >
      And I'm getting this error:
      >
      No mapping exists from object type
      System.Windows. Forms.DataGridV iewTextBoxColum n 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!- Hide quoted text -
      >
      - 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.

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: Anyone know what this means? (Updating DataGridView)

        Looch,

        It is strange, however I always set the connection property with a command.


        Cor


        "Looch" <lucianoj2005@y ahoo.comschreef in bericht
        news:1181076371 .779961.99860@m 36g2000hse.goog legroups.com...
        Hi all,
        >
        Here's the code I'm using:
        >
        Dim sqlCnn As New SqlConnection(c nn)
        Dim sqlCmd As New SqlCommand("Upd ate AMS.dbo.Call_Lo g Set
        Status = @status, UPSTrack = @ups where TicketNumberAct ual =
        @ticketnumber", sqlCnn)
        sqlCmd.Paramete rs.AddWithValue ("@ticketnumber ",
        SqlDbType.BigIn t.ToString())
        sqlCmd.Paramete rs(0).Value =
        dgConsumables.C olumns("TicketN umberActual")
        sqlCmd.Paramete rs.Add("@status ", SqlDbType.NVarC har, 50)
        sqlCmd.Paramete rs(1).Value = dgConsumables.C olumns("Status" )
        sqlCmd.Paramete rs.Add("@ups", SqlDbType.NVarC har, 50)
        sqlCmd.Paramete rs(2).Value = dgConsumables.C olumns("UPSTrac k")
        sqlCnn.Open()
        sqlCmd.ExecuteN onQuery()
        sqlCnn.Close()
        >
        And I'm getting this error:
        >
        No mapping exists from object type
        System.Windows. Forms.DataGridV iewTextBoxColum n 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!
        >

        Comment

        Working...