You don't say what the DB is so I've assumed that it's SQL Server. If that is the case then the various
information_schema
views are your friend; that or you can use
sysobjects
if you're using an ancient version. They'll tell you pretty much everything you might want to know about a DB.
If you're using a.n.other DB then there's likely to be a similar feature.
string connectionPath = @"Database=xxx;Server=yyy;User ID=zzz;Password=password;Network Library=dbmssocn;Connect Timeout=10;";
string getTableDef = @"select * from information_schema.columns where table_name = 'myTable'";
DataSet ds = new DataSet();
using (SqlConnection connection = new SqlConnection(connectionPath))
{
SqlDataAdapter da = new SqlDataAdapter(getTableDef , connection);
da.Fill(ds);
ds.WriteXml(xmlFilePath, XmlWriteMode.WriteSchema);
DataView dv = new DataView(ds.Tables[0]);
if (dv.count == 0) {
}
else {
}
}