I have a datagridview which contains 4 records.
I want to insert these records into access table.This access table already have records.
Datagridview's columns & access table's columns are same (datatype & columnname)
How can i insert these 4 records in access table???
Plz anybody help me..............
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\NorthWind.mdb"
Dim dbConnection As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)
For Each DR In DS.Tables(0).Rows
Dim queryString As String = "INSERT INTO table_name (Field1, Field2, Field3, Field4) VALUES ('" & DR.Item(0) & "', '" & DR.Item(1) & "', '" & DR.Item(2) & "', '" & DR.Item(3) & "')"
Dim dbCommand As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand(queryString, dbConnection)
You might have to make some adjustments to suite your needs, but I think the idea is more or less to:
Open a connection to your access database
Loop through the grid's rows and inserting them one by one
Can you plz tell me how to handle datagridviewcombox's event.
I have a datagrid which contains 3 combobox.
I want ,When i clicked 1st combo data should be filtered in 2nd combo.
Is it possoble in datagrid????
I think u can answer my question.
Plz help me.........