Dim conn As SqlConnection
Dim strCnn As String = "your connection string;"
conn = New SqlConnection(strCnn)
Dim icnt As Int64 = 0
If DataGridView1.Rows.Count > 0 Then
Dim cmdInsert As New SqlCommand
cmdInsert.Connection = conn
Dim strCommandText As String
Dim values As String = ""
strCommandText = "INSERT INTO your insert statement here)VALUES("
For i As Integer = 0 To DataGridView1.Rows.Count - 1
values = strCommandText & "Prepare your Values to pass from Grid i mean get the Cell values you want to insert into db "
cmdInsert.CommandText = values
icnt = icnt + 1
values = ""
cmdInsert = Nothing
Catch ex As Exception
If conn.State = ConnectionState.Open Then
thank's alot for your reply.
Can you give me an exact example for connection string, for an INSERT command and for what you wrote in line 21.
Because those the things that is Difficult for me.
you can come up with any names you want for sql name and values.
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 ...