2024年3月23日发(作者:)
using System;
using c;
using entModel;
using ;
using g;
using ;
using ;
using ;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
OleDbConnection mydata;
private void opendata()
{
mydata = new OleDbConnection("provider=.4.0;data
source=;jet oledb:database password=123");
();
}
private void button1_Click(object sender, EventArgs e)
{
if ( == "")
{
("字段名字不能为空!");
();
return;
}
if ( == "")
{
("字段类型不能为空!");
return;
}
//ListViewItem ls = ();
//();
( + " " + );
}
private void button2_Click(object sender, EventArgs e)
{
opendata();
string st1 = "create table "++" (";
for (int i = 0; i < ; i++)
if (i == - 1)
st1 = st1 + [i].Text + ")";
else
st1 = st1 + [i].Text + ",";
OleDbCommand mycommand = new OleDbCommand(st1, mydata);
try
{
eNonQuery();
("ssss");
}
catch
{
("fffffff");
}
}
private void button3_Click(object sender, EventArgs e)
{
//([1].Text + [1].SubItems[1].Text);
}
}
}


发布评论