if (comboBox1.Text=="CHR1")
{
n1 = 1;
}
else if(comboBox1.Text == "CHR2")
{
n1 = 2;
}
else if (comboBox1.Text == "CHR3")
{
n1 = 3;
}
else if (comboBox1.Text == "CHR4")
{
n1 = 4;
}
else if (comboBox1.Text == "CHR5")
{
n1 = 5;
}
if (comboBox2.Text == "1")
{
n2 = 6;
}
else if (comboBox2.Text == "2")
{
n2 = 7;
}
else if (comboBox2.Text == "3")
{
n2 = 8;
}
else if (comboBox2.Text == "4")
{
n2 = 9;
}
else if (comboBox2.Text == "5")
{
n2 = 10;
}
if (comboBox3.Text == "1002")
{
n3 = 11;
}
else if (comboBox3.Text == "1009")
{
n3 = 12;
}
else if (comboBox1.Text == "1666")
{
n3 = 13;
}
else if (comboBox1.Text == "1019")
{
n3 = 14;
}
else if (comboBox1.Text == "1676")
{
n3 = 15;
}
string dbPath = @"D:\历年高考分数.db";
string sq = @"Data Source=" + dbPath;
m = new SQLiteConnection(sq);
m.Open();
SQLiteDataAdapter mAdapter = new SQLiteDataAdapter("select *,yxlc from 表6,表1 where yi=y(n1+n2+n3)", m);
DataSet ds = new DataSet();
mAdapter.Fill(ds);
//mAdapter1.Fill(ds);
DataTable dt = ds.Tables[0];
//设置图表的数据源
Series Series1 = new Series();
chart1.DataSource = dt;
图一是建的表格,不知道有没有问题,图二是用sqlite使yi成为主键,图三是上面程序显示的错误