新闻资讯

c#中对access数据表中增加表,增加字段、删除字段

发布时间:2010-11-02

点击量:

protected void btnjb_Click(object sender, EventArgs e)
    {
        string aa = txtname.Text.Trim();
        string str = "create table "+aa.ToString()+"(id autoincrement,uname text,email text,times datetime)";
        执行

    }

//ID是自动编码字段


    protected void btnadd_Click(object sender, EventArgs e)
    {
        string aa = txtlie1.Text.Trim();
        string str = "alter table baolei add column " + aa.ToString() + " int";
        执行

    }
    protected void btndel_Click(object sender, EventArgs e)
    {
        string aa = txtlie2.Text.Trim();
        string str = "alter table baolei drop column " + aa.ToString();
        执行

    }


服务热线

服务热线

15383239821

微信咨询
微信二维码
返回顶部
×微信二维码

截屏,微信识别二维码

微信号:

(点击微信号复制,添加好友)

打开微信

微信号已复制,请打开微信添加咨询详情!