ImportIntoDataBase

FormDataConverter.ImportIntoDataBase method

Importa datos de la tabla a la base de datos.

public void ImportIntoDataBase(string connectString, DataType dbType)
ParámetroEscribeDescripción
connectStringStringCadena de conexión de la base de datos.
dbTypeDataTypeTipo de conexión a la base de datos: OLEDB u ODBC.

Ejemplos

FormDataConverter fc = new FormDataConverter();
DataTable table = new DataTable();
table.TableName = "test";
table.Columns.Add("TEXT_VALUE");
table.Columns.Add("INT_VALUE");
fc.Table = table;
DataRow row = table.NewRow();
row["TEXT_VALUE"] = "AAA";
row["INT_VALUE"] = "123";
table.Rows.Add(row);
string connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ConverterDatabase.mdb";
fc.ImportIntoDataBase(connection, DataType.OLEDB);

Ver también