How to insert datatable to a mysql database table

I want to insert the datatable containing 4000 records that shoud be inserted to mysql database table at a single insert to reduce time i need single insert can anyone help me on this.

Hi @Tamilarasanaccet

Check this

Thanks
Ashwin S

@AshwinS2 I am getting error like this INSERT: ERROR [42S22] [MySQL][ODBC 5.1 Driver][mysqld-5.7.24-log]Unknown column ‘System.Data.DataRow’ in ‘field list’

Hi @Tamilarasanaccet

Mention the column name like row(“Column1”).ToString

Use Bulk Insert query like insert into table name(column1,column2) values(“+row(“Column1”).ToString+”+row(“Column2”).ToString+"')

Thanks
Ashwin S

@AshwinS2 but i am passing datatable as the value there how can i mention row(“column”) can show me the sample

@Tamilarasanaccet

DT1.Rows(0).Item(“ColumnName”).ToString

@amaresan hi bro it insert first value only that is the datatable containing first value.

i need insert all the value of datatable at a single insert