当您尝试在我的 oracle 数据库中插入一行时,我遇到了这个错误。我使用 aspxgridview 提供的删除、插入功能。
我听说它可能是一个“;” 在 sql 指令的末尾但没有“;” 在这个 sql 语句中,这是带有插入、更新等 sql 指令的代码......
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:ConnectionStringora %>"
DeleteCommand="DELETE FROM "MAQUINA" WHERE "PATENTE" = ? AND "MARCA" = ? AND "MODELO" = ? AND "AÑO" = ? AND "FECHA_ADQUISICION" = ? AND "ESTADO" = ? AND "IDCONDUCTOR" = ? AND "IDMANTENCION" = ?"
InsertCommand="INSERT INTO "MAQUINA" ("PATENTE", "MARCA", "MODELO", "AÑO", "FECHA_ADQUISICION", "ESTADO", "IDCONDUCTOR", "IDMANTENCION") VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
OldValuesParameterFormatString="original_{0}"
ProviderName="<%$ ConnectionStrings:ConnectionStringora.ProviderName %>"
SelectCommand="SELECT "PATENTE", "MARCA", "MODELO", "AÑO", "FECHA_ADQUISICION", "ESTADO", "IDCONDUCTOR", "IDMANTENCION" FROM "MAQUINA""
UpdateCommand="UPDATE "MAQUINA" SET "MARCA" = ?, "MODELO" = ?, "AÑO" = ?, "FECHA_ADQUISICION" = ?, "ESTADO" = ?, "IDCONDUCTOR" = ?, "IDMANTENCION" = ? WHERE "PATENTE" = ? AND "MARCA" = ? AND "MODELO" = ? AND "AÑO" = ? AND "FECHA_ADQUISICION" = ? AND "ESTADO" = ? AND "IDCONDUCTOR" = ? AND "IDMANTENCION" = ?">
我认为可能导致此问题的另一件事是日期字段(FECHA_ADQUISICION).. aspxgridview 使用格式 dd-mm-yyy,我不知道 oracle 是否接受,因为当我尝试从“服务器”插入时explorer”(您可以查看数据库的那部分)我的日期有问题,我收到“ORA-01843 not a valid month”错误..所以我无法从那里插入。
请帮忙!