Skip site navigation (1) Skip section navigation (2)

VBA Recordset.AddNew and NOT NULL fields

From: "Brian Haney" <brian(at)cybernaut(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: VBA Recordset.AddNew and NOT NULL fields
Date: 1999-12-08 00:58:44
Message-ID: 001701bf4117$6054d9d0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I have a PostgreSQL (6.5.2) table "vendors" with a serial primary key

When I try to add a new record from VBA (under Excel 97, SR-2a) I get

	Run-time error 3155
	ODBC -- insert on linked table '???' failed.

A review of the odbc log file shows that it was trying to execute the
following command:

INSERT INTO  "vendors"

which of course fails since the primary key, vendor_id, cannot be null.

(The failure message from PostgreSQL was:
"ERROR:  ExecAppend: Fail to add null value in not null attribute

I'm using the PostgreSQL ODBC driver from Insight Distribution.

Is it possible to configure the driver or the recordset so it will not
attempt to insert a new record with all NULL values when I invoke the AddNew

Brian Haney

pgsql-interfaces by date

Next:From: Assaf ArkinDate: 1999-12-08 01:07:33
Subject: Transaction support in 6.5.3/JDBC
Previous:From: Christian HangDate: 1999-12-07 21:53:58
Subject: ODBC and Large Objects, FAQ not working

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group