473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help inserting record to PG with MS Access frontend

Hello,

Sorry for the newb question; I've spent a good amount of time trying to figure this out. I am fairly new to the Postgre world. I am currently in the process of upsizing several MS Access apps to a single PostgreSQL system; I will continue to use Access as the frontend. I have duplicated the table structure in Postgre and have successfully connected Access as a frontend to view data.

I am having trouble inserting a record into Postgre using Access. I am using a bound form with command button to insert to 2 tables with the event code
Expand|Select|Wrap|Line Numbers
  1. DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
  2.  
I get the error message "ODBC--insert on a linked table 'sinfo' failed. ERROR: null value in column "personid" violates not-null constraint."

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE person
  2. (
  3.   personid serial NOT NULL,
  4.   fname character varying(50),
  5.   lname character varying(50),
  6.   roleid bigint,
  7.   CONSTRAINT person_pkey PRIMARY KEY (personid),
  8.   CONSTRAINT person_roleid_fkey FOREIGN KEY (roleid)
  9.       REFERENCES "role" (roleid) MATCH SIMPLE
  10.  
  11. CREATE TABLE sinfo
  12. (
  13.   personid bigint NOT NULL,
  14.   sid character varying(7) NOT NULL,
  15.   CONSTRAINT stinfo_pkey PRIMARY KEY (personid),
  16.   CONSTRAINT sinfo_personid_fkey FOREIGN KEY (personid)
  17.       REFERENCES person (personid) MATCH SIMPLE
  18.   CONSTRAINT sinfo_sid_key UNIQUE (fduid)
  19.  
Thanks for your time
Mar 25 '08 #1
0 2605

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Little PussyCat | last post by:
Hello, I hope you can help me. We have a SQL Server 2000 database at work, (which works with a VB6 frontend) which grew to a considerable size, so one of my past colleagues sent me this...
0
by: JIM WHITAKER | last post by:
Are there any good PHP scripts or pre written programs that deal with a complex database? Let me explain: I'm in truck dispatch, and we've moved all tables to mysql and access them on a network...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
1
by: David Ehrenreich | last post by:
Hello, I have my Database setup with a backend and several instances of the same form in a frontend linked to the backend tables. Their are several of these frontend stations. What I like to...
8
by: markus_fried | last post by:
Hi, we're using Access97 as frontend to a Oracle db. In Access we have a bound form which is using a Dynaset as source, global locking and form locking is off. All worked well until...
13
by: Jim M | last post by:
I've been playing with Allen Browne's audit code and found it very useful. I need to track record insertions, deletions, and edits for several tables. I am planning to replace Access with Microsoft...
1
by: Julia | last post by:
Hello there. I have a question somewhat related to this topic, and I don't know where else to go. I hope somebody can help. I've created a database in access, that I'd like to share with less...
11
by: Sandy | last post by:
Hello - Thought I was almost done with my project and then a back arrow button issue raised its ugly head. Once a user fills out a form and submits it (done via stored procedure into a Sql...
1
by: Joe | last post by:
Hi, I have an asp.net page that opens up a connection to MS access DB and does insert into DB. I am using close() and setting the connection object to Nothing after I am done with inserting a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.