Update 无法找到 TableMapping['sonproject'] 或 DataTable“sonproject”。
namespace Database
{
public class Dbase
{
private string ss = "Integrated Security=SSPI;User Id=sa;database=jindu;server=localhost ";
public SqlConnection sqlcon;
public static System.DateTime[] time = new System.DateTime[50];
public Dbase()
{
this.sqlcon=new SqlConnection(this.ss);
sqlcon.Open();
}
public DataSet getdataset(string Sqltext)
{
DataSet ds=new DataSet ();
SqlDataAdapter da = new SqlDataAdapter(Sqltext, this.ss);
SqlCommandBuilder thisbuilder = new SqlCommandBuilder(da);
da.Fill(ds);
return ds;
}
public void update(string Sqltext,string table)
{
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(Sqltext, this.ss);
SqlCommandBuilder thisbuilder = new SqlCommandBuilder(da);
da.Fill(ds);
da.Update(ds,table);
}
}
namespace manage
{
public partial class sonproject : Form
{
........................
string cm = "select * from sonproject ";
Dbase db