Troubleshooting

<< Click to Display Table of Contents >>

Navigation:  Supported database systems > PostgreSQL >

Troubleshooting

Previous pageReturn to chapter overviewNext page

Cannot load vendor library

If the correct version of Microsoft Visual Studio C++ Redistributable run-time library has not been installed you will get the following error notification:

 

clip0446

 

The Microsoft Visual Studio 2013 (VC++ 12.0) C++ Redistributable run-time library must be installed. The file you need is for the X86 architecture (32-bit x86) and is named vcredist_x86.exe.

 

The run-time library can be downloaded here:

 

Microsoft Visual Studio 2013 (VC++ 12.0)  Redistributable

clip0447

 

Direct link: https://aka.ms/highdpimfc2013x86enu

How to fix "duplicate key violates unique constraint" error

Below is an example of how to correct this issue if the key sequence for the Order Item table (dsptch30_contract_item) becomes corrupted.

 

First, using pgAdmin, determine the column name of the key sequence the dsptch30_contract_item table. Row_id is the name of the unique row identifier:

 

SELECT pg_get_serial_sequence('dsptch30_contract_item', 'row_id')

 

Next, find out what the next value in the sequence:

 

a. SELECT nextval('dsptch30_contract_item_row_id_seq')

 

Or you can use:

 

b. SELECT nextval((select pg_get_serial_sequence('dsptch30_contract_item', 'row_id')))

 

Now, find out the maximum value in the sequence:

 

SELECT MAX(row_id) FROM dsptch30_contract_item)

 

If maximum value is less than next value, update the sequence:

 

SELECT setval('dsptch30_contract_item_row_id_seq', (SELECT MAX(row_id) FROM dsptch30_contract_item) + 1)

 

https://stackoverflow.com/questions/4448340/postgresql-duplicate-key-violates-unique-constraint