qq_36196843
百鬼夜煞行
2017-09-05 01:54

asp.net网页之间传值之后,查询语句失败

  • asp.net

直接给变量赋值的话,本网页下的查询语句能正确运行
但是从登陆页面传值到该网页下就会报错,说sql语句未正确结束
public DataSet ExecSQL(string queryString, string connType)//创建了一个数据缓存
{
DataSet ds = new DataSet();
ConnectionStringSettings settings;
settings = ConfigurationManager.ConnectionStrings[connType];

   if (connType == "oracleconn" || connType == "ComCalConn" || connType == "MajorTraceConn" || connType == "CRM" || connType == "FSALARY" || connType == "REINS")
        {
            OracleConnection conn = new OracleConnection(settings.ConnectionString);
            conn.Open();
            OracleCommand command = new OracleCommand(queryString, conn);
            OracleDataAdapter adapter = new OracleDataAdapter(command);
            adapter.Fill(ds);
            conn.Close();
        }
                    错误指向adapter.fill(ds)

哪位大佬能给解答一下嘛,非常感谢

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答