主营业务:网站制作 网站优化 小程序制作 石家庄网站制作网站建设有限公司欢迎您!
石家庄闪云网络科技有限公司
客服热线15383239821
如何让自己的网站更有质量?

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

发布时间:2010/11/2 10:47:25

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 电子邮箱: 27535611@qq.com

公司地址:石家庄市新华区九中街江西大厦4062

备案号:冀ICP备2022000585号-4