can any body help me by giving me a guideline on how to insert data from a populated datagrid into sql server table and how to make the values conform to the specified datatypes constructe in the sql server side...assuming the datagrid headings have already been created in the sql server side. Thanks.
the code below is what i have tried to implement it but it is showing me an error:" Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" . any correction would be helpful
Dim objConnection As New SqlConnection(("server=SEER;database=Test;user id=sa;password=ASDSER"))
Dim objCommand As SqlCommand = New SqlCommand()
objCommand.Connection = objConnection
'insert data to sql database row by row
Dim Symbol, pubDate As String
Dim volume_of_transaction, transaction_amount As String
For i As Integer = 0 To Me.DtaGridXML.Rows.Count
Symbol = Me.DtaGridXML.Rows(i).Cells(0).ToString()
volume_of_transaction = Me.DtaGridXML.Rows(i).Cells(1).ToString()
transaction_amount = Me.DtaGridXML.Rows(i).Cells(2).ToString()
pubDate = Me.DtaGridXML.Rows(i).Cells(3).ToString()
objCommand.CommandText = "INSERT INTO TopTrades" & _
"(Symbol, volume_of_transaction, transaction_amount, pubDate)" & _
"VALUES('Symbol', 'volume_of_transaction', 'transaction_amount', 'pubDate')"
Catch SqlExceptionErr As SqlException
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...