save data data in sql server VB

0

Hi, I'd like you to help me, I'm wanting to log into my datagridtw to a sql server table

 Using Con As New SqlConnection(ConfigurationManager.ConnectionStrings("conexion").ConnectionString)
                Con.Open()


                Using command As New SqlCommand("sp_RespaldoMonto", Con)
                    command.CommandTimeout = 90000000
                    command.CommandType = CommandType.StoredProcedure
                    command.Parameters.Add("@idcredito", SqlDbType.Int)
                    command.Parameters("@idcredito").Value = ToString(DataGridView1.CurrentRow.Cells(0).Value)
                    command.Parameters.Add("@numerocredito", SqlDbType.Int)
                    command.Parameters("@numerocredito").Value = ToString(DataGridView1.CurrentRow.Cells(1).Value)
                    command.Parameters.Add("@idrubro", SqlDbType.Int)
                    command.Parameters("@idrubro").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(6).Value)
                    command.Parameters.Add("@numeroactual", SqlDbType.Int)
                    command.Parameters("@numeroactual").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(7).Value)


                    command.Parameters.Add("@idcuotacredito", SqlDbType.Int)
                    command.Parameters("@idcuotacredito").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(8).Value)
                    command.Parameters.Add("@fechavencimiento", SqlDbType.VarChar, 200)
                    command.Parameters("@fechavencimiento").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(9).Value)
                    command.Parameters.Add("@descripcion", SqlDbType.VarChar, 180)
                    command.Parameters("@descripcion").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(10).Value)
                    command.Parameters.Add("@saldo", SqlDbType.Int)
                    command.Parameters("@saldo").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(11).Value)
                    command.Parameters.Add("@valor", SqlDbType.Int)
                    command.Parameters("@valor").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(12).Value)
                    command.Parameters.Add("@numerocuotamodificado", SqlDbType.Int)
                    command.Parameters("@numerocuotamodificado").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(13).Value)
                    command.Parameters.Add("@idcuotacreditomodificado", SqlDbType.Int)
                    command.Parameters("@idcuotacreditomodificado").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(14).Value)
                    command.Parameters.Add("@saldomodificado", SqlDbType.Int)
                    command.Parameters("@saldomodificado").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(15).Value)
                    command.Parameters.Add("@fechavencimientomodificado", SqlDbType.VarChar, 200)
                    command.Parameters("@fechavencimientomodificado").Value = Convert.ToString(DataGridView1.CurrentRow.Cells(16).Value)


                    command.ExecuteNonQuery()
                    MessageBox.Show("Proceso concluyo satisfactoriamente ...!", "..::Aviso del Sistema::..")
                    Me.Close()
                    Form2.Show()
                    Form2.Enabled = True

                    Form1.MenuStrip.Enabled = False
                End Using



            End Using

I get this error:

    
asked by PieroDev 24.02.2017 в 02:17
source

0 answers