得到 sql表的字段和类型
select name from syscolumns where id = object_id('user')
select a.name as [column],b.name as type
from syscolumns a,systypes b
where a.id=object_id('user') and a.xtype=b.xtype and a.name='userid'
表清单
conn.Open();
dt= conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" });
conn.Open();
dtColumnsInfo = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, new object[] { null, null, strTableName,null });