worldatlas
MIS
I'm trying to add every checked row in a datagrid to another datasource (sqlConnection2) different
from the one I've binded to the datagrid (sqlConnection1). However, I don't know how to proceed this...So far I have this, and now I'm stuck. I'm very new at this, so any suggestion is greatly appreciated.
Thank you
Private Sub Confirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Confirm.Click
Dim DS As DataSet
Dim MyCommand As SqlCommand
Dim InsertCmd As String = "insert into CorrectionData (DGLTACCUNT, CreditAcctUnit, CreditAcct, CreditActivity, CreditCategory, Credit_Ind, CreditAmt, CreditUnit, CreditDescription, CreditReference, DebitAcctUnit, DebitAcct, DebitActivity, DebitCategory, Debit_Ind, DebitAmt, DebitUnit, DebitDescription, DebitReference, TransferUserID, PostingDate, Year, Period, TransType)"
MyCommand = New SqlCommand(InsertCmd, SqlConnection2)
MyCommand.Parameters.Add(New SqlParameter("@CreditAcctUnit", SqlDbType.Char, 5))
MyCommand.Parameters("@CreditAcctUnit").Value =
End Sub
from the one I've binded to the datagrid (sqlConnection1). However, I don't know how to proceed this...So far I have this, and now I'm stuck. I'm very new at this, so any suggestion is greatly appreciated.
Thank you
Private Sub Confirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Confirm.Click
Dim DS As DataSet
Dim MyCommand As SqlCommand
Dim InsertCmd As String = "insert into CorrectionData (DGLTACCUNT, CreditAcctUnit, CreditAcct, CreditActivity, CreditCategory, Credit_Ind, CreditAmt, CreditUnit, CreditDescription, CreditReference, DebitAcctUnit, DebitAcct, DebitActivity, DebitCategory, Debit_Ind, DebitAmt, DebitUnit, DebitDescription, DebitReference, TransferUserID, PostingDate, Year, Period, TransType)"
MyCommand = New SqlCommand(InsertCmd, SqlConnection2)
MyCommand.Parameters.Add(New SqlParameter("@CreditAcctUnit", SqlDbType.Char, 5))
MyCommand.Parameters("@CreditAcctUnit").Value =
End Sub