Page 1 of 1

ODBC Quickbooks online cannot delete?

Posted: Thu 23 Jan 2020 22:17
by davephillips
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

Re: ODBC Quickbooks online cannot delete?

Posted: Fri 31 Jan 2020 15:33
by MaximG
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.

Re: ODBC Quickbooks online cannot delete?

Posted: Wed 27 Jan 2021 09:44
by daniellisa
will it be able to delete it permanently? I have experienced many errors like -6010 -100, and finding the fault is another burden. I hope it doesn't prompt some QB errors.

Re: ODBC Quickbooks online cannot delete?

Posted: Mon 01 Feb 2021 14:19
by MaximG
If referential integrity constraints are not broken, you should be able to delete data from QuickBooks tables. The data is deleted permanently.