string sql = @"SELECT sum(subtotal) FROM table1 WHERE clientid=:v1;" +
"SELECT * FROM table2 WHERE clientid = :v2 "
cmd = DBConnection.GetCommand();
cmd.CommandText = sql;
cmd.Parameters.Clear();
cmd.Parameters.Add(":v1", "Name1");
cmd.Parameters.Add(":v2", "Name2");
OracleDataReader reader = cmd.ExecuteReader(); //Error: Invalid Character
while (reader.Read())
{
..results from first query
}
reader.NextResult();
while (reader.Read())
{
..results from second query
}
.NET 不允许 reader.NextResults 使用绑定变量?为什么我得到无效字符?