KonnexionsGmbH / OraLixir

Oracle driver for Elixir
Other
2 stars 4 forks source link

Getting 'DPI-1028: query position 1 is invalid' after trying to delete a row from a table #6

Closed cruzfarfan closed 4 years ago

cruzfarfan commented 4 years ago
iex(2)> OraLixir.prepare_execute(pid, "name", "DELETE FROM CHANNELS WHERE CHANNEL_ID = 3", [], [])
** (ArgumentError) raise/1 and reraise/2 expect a module name, string or exception as the first argument, got: {:error, %{api: :stmt_getQueryInfo, args: [#Reference<0.1725727705.1425145874.206828>, 1], node: nil, oranifFile: 'c_src/dpiStmt_nif.c', oranifLine: 183, reason: %{action: 'check query position', code: 0, encoding: 'UTF-8', fnName: 'dpiStmt_getQueryInfo', isRecoverable: false, message: 'DPI-1028: query position 1 is invalid', offset: 0, sqlState: 'HY000'}}}
    (oralixir) lib/oralixir/connection.ex:136: anonymous fn/4 in OraLixir.Connection.handle_execute/4
    (elixir) lib/enum.ex:3019: Enum.reduce_range_dec/4
    (oralixir) lib/oralixir/connection.ex:132: OraLixir.Connection.handle_execute/4
    (db_connection) lib/db_connection/holder.ex:293: DBConnection.Holder.holder_apply/4
    (db_connection) lib/db_connection.ex:1255: DBConnection.run_execute/5
    (db_connection) lib/db_connection.ex:1342: DBConnection.run/6
    (db_connection) lib/db_connection.ex:540: DBConnection.parsed_prepare_execute/5
    (db_connection) lib/db_connection.ex:533: DBConnection.prepare_execute/4

See complete error message in attachment: OraNif_error.txt

c-bik commented 4 years ago

@cruzfarfan fixed in PR #7 please have a look