using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAO;namespace BS
{
class EquipmentAll
{
}
/// <summary>
/// 获取T_EquipmentAll表中的记录
/// </summary>
/// <param name="">无参数</param>
/// <returns>DataSet</returns>
static public DataSet EquipmentGetDataSet("d")
{
string selectSql="select * from T_EquipmentAll ";
return DAOHelper.getDataSet(selectSql);
}
}
错误为:
错误 1 应输入 class、delegate、enum、interface 或 struct C:\Inetpub\wwwroot\Sub\BS\EquipmentAll.cs 18 16 BS
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAO;namespace BS
{
class EquipmentAll
{
}
/// <summary>
/// 获取T_EquipmentAll表中的记录
/// </summary>
/// <param name="">无参数</param>
/// <returns>DataSet</returns>
static public DataSet EquipmentGetDataSet("d")
{
string selectSql="select * from T_EquipmentAll ";
return DAOHelper.getDataSet(selectSql);
}
}
错误为:
错误 1 应输入 class、delegate、enum、interface 或 struct C:\Inetpub\wwwroot\Sub\BS\EquipmentAll.cs 18 16 BS
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAO;namespace BS
{
class EquipmentAll
{
}
/// <summary>
/// 获取T_EquipmentAll表中的记录
/// </summary>
/// <param name="">无参数</param>
/// <returns>DataSet</returns>
public static DataSet EquipmentGetDataSet()
{
string selectSql="select * from T_EquipmentAll ";
return DAOHelper.getDataSet(selectSql);
}
}
//
上面这个就是我的方法EquipmentGetDataSet() 而"d"是我随便写的,没有用这个参数,而返回类型是DataSet
你这个方法是什么方法
都不在类里面!
怎么写出来的?
将你的方法放在类里面
---------------------------------
谢谢,就是这个问题
之前我还着重检查了一下是不是这个错,但是自己没有反应过来,把这个明显错误给忽略了.
这个错已经是第二次犯了.太粗心了.
谢谢啦
{
string selectSql="select * from T_EquipmentAll ";
return DAOHelper.getDataSet(selectSql);
}改为
static public DataSet EquipmentGetDataSet(string selectSql)
{
return DAOHelper.getDataSet(selectSql);
}