Here are the examples of the csharp api class Dos.DbObjects.OleDb.DbObject.Tab2Colum(System.Data.DataTable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
Project: Dos.Tool
Source File: DbObject.cs
Source File: DbObject.cs
public DataTable GetColumnList(string DbName, string TableName) { this.OpenDB(); object[] restrictions = new object[4]; restrictions[2] = TableName; DataTable oleDbSchemaTable = this.connect.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, restrictions); return this.Tab2Colum(oleDbSchemaTable); }
0
2. Example
Project: Dos.Tool
Source File: DbObject.cs
Source File: DbObject.cs
public DataTable GetColumnInfoList(string DbName, string TableName) { this.OpenDB(); object[] restrictions = new object[4]; restrictions[2] = TableName; DataTable oleDbSchemaTable = this.connect.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, restrictions); DataTable dt = this.Tab2Colum(oleDbSchemaTable); DataTable primarykeydt = this.GetKeyName(DbName, TableName); if (null != primarykeydt && primarykeydt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { DataRow[] drs = primarykeydt.Select("ColumnName='" + dr["ColumnName"].ToString() + "'"); if (null != drs && drs.Length > 0) { dr["isPK"] = "?"; } else { dr["isPK"] = ""; } } } return dt; }