473,657 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help inserting record to PG with MS Access frontend

65 New Member
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 2632

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

Similar topics

2
2359
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 truncate statement to use on the database. I ran it like this, and all appeared to be well, it shrank the database, Shortly afterwards, after I ran this I noticed something not quite right. for example, one of the tables we keep is a User_Admin table...
0
1211
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 via ms access. We will open another office in another city, and will want a "web" database. Now here's what I'm after: Currently one form has various dropdown boxes to pick customer, shipper, consignee, and carrier information. YES, I even have...
9
4344
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 predecessor, I hasten to add) so that each day it creates a copy of the record for each company, changes the date to today's date, and prompts the user for any changes of ratings on that day. The resulting data table grows by approx 600 records per...
1
2095
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 do is when a user is working with a record another user on another station wont be able to enter into that record for editing. I would like a message box to appear telling the user to try again at another time. I was told about EditMode Property...
8
12001
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 yesterday. We dublicated some records for a new session in the Oracle db and since then some of these records cannot be edited from Access. An error occurs: "This record has been changed by another user since you started editing...". We are in a single-user
13
4982
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 SQL server for my back end, but continue to use Access for the front end. I understand I can create an audit trail of record changes in SQL at the table level, instead of at the form level in Access. I have been playing with Access since the...
1
4315
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 than 10 users. I'd like each user to see only some of the records in the database. So for example, if I have eight users in eight countries, I want each of them to only see information for their country. I was told that the easiest way to do...
11
1450
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 Server database), what's to prevent them from pressing the back button and resubmitting the form multiple times and creating havoc with my database? How is this issue usually handled?
1
2456
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 record. After inserting when I look at the server where the MS access DB resides I also see a *.ldb file also. For some reason I cannot get rid of this *.ldb file even after I close the connection to DB from my asp.net page. As long as this *.ldb file is...
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.