1、查询某一表的主键 sp_pkeys tabelname
2、查询数据库中的所有表的名称
select [name] from sysobjects where xtype = 'U' and [name] <> 'sysdiagrams' and category=0
order by [name]
3、查询指定表的列名,类型,长度
select syscolumns.name AS ColumnName,systypes.name AS TypeName,syscolumns.length as length ...
private void Form1_Load(object sender, EventArgs e)
{
this.KeyPreview = true;//让窗体接收键盘按键
}
protected override void OnKeyPress(KeyPressEventArgs e)
{
base.OnKeyPress(e);
if (DesignMode) return;
if (e.KeyCha...
public class AppException : Exception
{
public AppException()
{
}
public AppException(string message) : base(message)//注意这里
{
}
public AppException(object invalidData, string message)
: base(message + "\n数据:" + i...