报错:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xx' at line 1
xx是存储过程名字
存储过程
create procedure xx
begin
select bb from test;
end;
C# 业务层:
public DataSet testa()
{
DataBase db = new DataBase();
return db.GetDataSet("xx");
}
数据层:
public DataSet GetDataSet(String ProcName)
{
Open();
MySqlDataAdapter adapter = new MySqlDataAdapter(ProcName, conn);
DataSet ds = new DataSet();
adapter.Fill(ds);
Close();
return ds;
}
各位帮帮我啊 急用啊
------解决方案--------------------
create procedure xx
AS
begin
select bb from test;
end;
------解决方案--------------------
adapter.SelectCommand.CommandType = CommandType.StoredProcedure;
你不指定,谁知道是存储过程啊?