Dec 20, 2016, 9:37 AM
1 Posts

Error while inserting JDBCRecord to SQL Table

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: XPages Application
  • Replies: 0

The acceptChanges() method throws SyncProviderException while trying to insert a new record and the error message is "1 conflicts while synchronizing". The error occurs only when there is a column in the SQL table that increments it's value by itself (there could be other scenarios too that I haven't encountered yet). It would  have been helpful if a more detailed error was thrown.

Anybody knows of a way to get a more detailed error message or a way to fix this? Also, is there a way to get a return value after the insert using this method? I would have asked Philip Riand directly but I don't have his contact details.

Here is the complete code (Except the connection manager control, that is in another custom control).


<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="" xmlns:xe="">
    <xp:panel id="boxCase">
            <xe:objectData var="docKeyword"
                createObject="#{javascript:new app.documents.Keyword()}">
            <xe:jdbcRowSet var="jdbcRowSet1" maxRows="1"
                sqlQuery="select * from dbo.Table_Test where 1=4">
            <xe:objectData var="recKeyword">
                if (jdbcRowSet1.getCount()>0) {
                } else {

        <xp:inputText id="inputText14" value="#{recKeyword.Country}">
        <xp:button type="button" themeId="Button.Green.Small" id="button1">
            <xp:eventHandler event="onclick" submit="true"
                refreshMode="partial" refreshId="boxCase">
                recKeyword.setValue("ID",1); //AUTO INCRMENTED COLUMN
                try {
                } catch(e) {