ODBC Quickbooks online cannot delete?

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
davephillips
Posts: 3
Joined: Sun 11 Aug 2019 15:42

ODBC Quickbooks online cannot delete?

Post by davephillips » Thu 23 Jan 2020 22:17

I am trying to delete a record that was inserted into the 'purchase' table in QBO. There is a child table called 'purchaselineitem' which I cannot delete directly. When I run the following SQL:

delete from purchase where id = '1927'

I tried adding 'AND PaymentType = 'Check' (which it does) but that didn't help.

I get the following error:
SQL Error [S1000]: [Devart][ODBC][QuickBooks]Required parameter PaymentType is missing in the request


at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:413)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:148)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:405)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:866)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2825)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:98)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:148)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:96)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$17.run(ResultSetViewer.java:3427)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.sql.SQLException: [Devart][ODBC][QuickBooks]Required parameter PaymentType is missing in the request
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6964)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7121)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3117)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:338)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more


Any ideas on how to delete? I can't find any documentation on it.

Dave

MaximG
Devart Team
Posts: 1483
Joined: Mon 06 Jul 2015 11:34

Re: ODBC Quickbooks online cannot delete?

Post by MaximG » Fri 31 Jan 2020 15:33

Are you able to successfully delete child records from the table "PurchaseLineItem" before deleting the parent record from the "Purchase" table? Please send us the complete SQL query that you use to delete the records.

Post Reply