My code skips the part where it reads the table from another database. It has to use the for each for my code to work. When i use a different database kind it works but with sqlite it can't read the insides of the database. The whole code is to migrate databases to different programs.
DataTable schemaUserTables = m_objDbSource.GetSchemaUserTables();
DataRow[] sortedUserTables = schemaUserTables.Select("TABLE_NAME <> 'sysdiagrams'",
"TABLE_SCHEMA ASC, TABLE_NAME ASC", DataViewRowState.CurrentRows);
foreach (DataRow schemaUserTable in sortedUserTables)
{
object oSchema = schemaUserTable["TABLE_SCHEMA"];
if (Convert.IsDBNull(oSchema))
{
m_clbTables.Items.Add(schemaUserTable["TABLE_NAME"]);
}
else
{
m_clbTables.Items.Add(schemaUserTable["TABLE_SCHEMA"] + "." + schemaUserTable["TABLE_NAME"]);
}
}
Aucun commentaire:
Enregistrer un commentaire