我对 Oracle 命令有一个小问题,如下所示:
command.CommandText = "SELECT ID, NAME, RATING, LENGTH, STARTTIME FROM SCHEDULE WHERE ID=301 AND ROWNUM=1 AND SCHEDULE.STARTTIME <= SYSDATE ORDER BY STARTTIME DESC;";
它在 Oracle SQL Developer 中运行得非常好,完全返回了我需要的内容,但在 C# 中,我收到以下错误:
ORA-06550: line 1, column 186:
PLS-00103: Encountered the symbol "," when expecting one of the following:
. ( * @ % & = - + < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec as between || indicator multiset member
submultiset
任何人都可以看到它的任何问题,或者 C# 中的任何非法内容吗?
编辑:执行代码:
command.Connection = conSQL;
using (IDataReader reader = command.ExecuteReader())
{
do
{
int count = reader.FieldCount;
while (reader.Read())
{
for (int i = 0; i < count; i++)
{
string setting = reader.GetName(i).ToString();
object value = reader.GetValue(i);
** Data assigned to variables here, hidden due to length of code**
** Follows pattern: object.property(reader.name) = reader.value **
}
}
} while (reader.NextResult());
}