Error inserting data

Posted by themochael on 12-Aug-2015 15:01

The table name is provider and the database is named PROV

After getting the driver installed, i am not getting this error while trying to insert:

java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Table/View/Synonym not found (7519) 
at com.savvion.jdbc.openedge.client.OpenEdgeClientRequest.prepareProcessReply(Unknown Source) 
at com.savvion.jdbc.openedge.client.OpenEdgeClientRequest.prepare(Unknown Source) 
at com.savvion.jdbc.openedge.OpenEdgeImplStatement.prepare(Unknown Source) 
at com.savvion.jdbc.openedgebase.BaseImplStatement.prepare(Unknown Source)

 

INSERT INTO provider (p1m0-prov-no, p1m0-prov-lst-nm, p1m0-prov-frst-nmi, p1m0-prov-str-nm, p1m0-prov-city, p1m0-prov-st, p1m0-prov-zpcd, p1m0-prov-zpcd2, p1m0-prov-ph-no, p1m0-prov-gpre-no, p1m0-prov-ssn-no, p1m0-prov-tax-ssno, p1m0-prov-unique-no, p1m0-pprov-locd, prov-name, p1m0-prov-cnty-cd, p1m0-prov-tycd, p1m0-prov-spcd, p1m0-prov-lic-no, p1m0-prov-payee-name, p1m0-prov-out-st-flg, p1m0-prov-sobra-flg, p1m0-prov-qmb-flg, p1m0-epsdt-referred-flag, p1m0-prov-enrl-stcdm-1, p1m0-prov-enrl-stdtm-1, p1m0-prov-enrl-stp-dtm-1, p1m0-prov-enrl-stcdm-2, p1m0-prov-enrl-stdtm-2, p1m0-prov-enrl-stcdm-3, p1m0-prov-enrl-stdtm-3, p1m0-prov-enrl-stp-dtm-3, p1m0-prov-update-0, p1m0-prov-enrl-stp-dtm-2)

VALUES

All Replies

Posted by Roberta Miller on 12-Aug-2015 15:22

There are two issues with your query, either one of which will cause error (7519) all by itself:

1. Tables created in the native OpenEdge language (called ABL or 4GL depending on the OpenEdge version) belong to the schema PUB. Since there is no actual user PUB that will be querying the database, you have to qualify the table name with the PUB schema.

2. OpenEdge ABL allows hyphens in table and field names, but SQL does not. Any table or field names containing hyphens must be double-quoted.

For example, your query should start :

INSERT INTO PUB.provider ("pqm0-prov-no", "p1m0-prov-lst-nm", ...

If you are going to be using SQL frequently, you may want to create views over tables that have hyphens in the names, naming the views and all the view columns without using hyphens.

HTH

Posted by Roberta Miller on 12-Aug-2015 15:28

You may also want to look at article 000001353, How to troubleshoot error 7519 with SQL-92 in the Progress knowledge base.

Posted by themochael on 12-Aug-2015 16:01

Thank you - that was it

Posted by themochael on 13-Aug-2015 09:47

If I wanted to truncate the data prior to insert, how would I do that?

Posted by Roberta Miller on 13-Aug-2015 11:13

OpenEdge SQL has a SUBSTRING function you can use on the values you are inserting. To insert the first eight characters from an imaginary column into a column of a new record in another table, it would look something like this:

INSERT INTO PUB.provider ("pqm0-prov-no") SELECT SUBSTRING(LongColumn, 1, 8) FROM PUB.OtherTable WHERE UniqueKey = 1

Is this what you are trying to do?

Complete documentation of the SUBSTRING function is in OpenEdge Data Management: SQL Reference, Chapter 2, "OpenEdge SQL Functions > SUBSTRING (ODBC compatible)". You can find the OpenEdge documentation for various versions online at community.progress.com/.../1329.openedge-product-documentation-overview.aspx.

Posted by themochael on 17-Aug-2015 15:04

How about this error?

Caused by: java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver]Invalid parameter binding(s).

at com.ddtek.jdbc.openedgebase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseExceptions40.createSQLException(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseExceptions.createException(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseExceptions.getException(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseParameters.getParameter(Unknown Source)

at com.ddtek.jdbc.openedgebase.BasePreparedStatement.setObjectInternal(Unknown Source)

at com.ddtek.jdbc.openedgebase.BasePreparedStatement.setObject(Unknown Source)

at com.ddtek.jdbc.openedgebase.BasePreparedStatement40.setObject(Unknown Source)

Posted by Roberta Miller on 20-Aug-2015 12:08

The Java application is issuing a prepared query, and there is something wrong about the way the parameters are being passed. We would have to see the Java code to know what is going on. Based on the stack trace in your first post of this thread, I am guessing that the error is coming from Savvion or OpenEdge Business Process Management (OEBPM) and you don't have the actual Java code that makes the query. If so, your best bet is to open a Technical Support case for that product so someone can take a look for you.

This thread is closed