Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert trigger problems with msde 1

Status
Not open for further replies.

pflangan

Programmer
Jun 13, 2001
49
GB
I'm using msde with access 2000. I've got a problem with insert triggers, and I don't know what's causing it.
Update and delete triggers work fine, but insert just ain't cuttin it.

The trigger saves fine, but when I enter a new row directly into the table access throws up the following message.

The data was added to the database but the data won't be displayed because it doesn't satisfy the criteria in the underlying record source

If I close the table and reopen it the new data appears fine, but the message gets a little annoying, as the data disappears. this is a problem with forms etc.

here is the code. can anyone make a stab at the problem

Create Trigger notes_insert_trigger
On dbo.notes

FOR Insert
As

insert into dbo.tblAudits (description) VALUES ('new row inserted')


and i have tried SET NOCOUNT ON, but to no avail. it's not all that complicated a problem, but very annoying
 
Hi pflangan,
It looks like that the problem you are having is while inserting data in notes table and not in tblAudits. Please check the constraints on the notes table and the data you are inserting. I think, that is the most likely cause of this problem.
 
quick reply, but no dice.
There are no constraints on the notes table. It's just a test table with two fields:
noteID int primarykey
hitman;-) varchar

and the same is true of the tblAudits table

When i change the trigger type to update or delete, it works fine.
 
yet another of my own problems answered.
The problem has henceforth disappeared. The reason... I got out my trusty techNet service packs, and installed service pack 3 for sqlserver 7.0 and msde 1.0

now i can get on with my replication

pflangan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top