473,387 Members | 1,603 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,387 software developers and data experts.

Using ADO AddNew and my simple trigger won't execute

Hi,

We have been using ADO and the AddNew method for a long time as a means
to add records to the database. It has always worked fine - no problem.
But - we recently started using INSERT triggers that simply call a few
stored procs (they're actually SSNS stored procs that send new event
info to notification services). Anyway, these triggers do not seem to
fire at all! If I execute an insert command manually from Query
Analyser, no problems. But the trigger does not fire at all from my
application!

Does anyone know why this could be? For info, my connection string used
by the ADO connection object looks like this: Provider=SQLOLEDB.1;Data
Source=XXX;Initial Catalog=YYY

And my AddRecord ADO code looks like this:

With rs
.Open sSQL, ConnectionString, adOpenKeyset, adLockOptimistic,
adCmdTable And adExecuteNoRecords
.AddNew

Am I mnissing something obvious here? Any help appreciated!

May 8 '06 #1
1 2061
Apologies everyone - It was my own problem after all.
The user I was running the ADO code under did not have permissions to
write to the database after all.

May 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Roger Withnell | last post by:
I'm inserting a new record into an MS SQL database table and I want to obtain the new records autonumber immediately afterwards, as follows: MadminRS.CursorLocation = adUseServer...
3
by: Terri | last post by:
I'm using xp_cmdshell to output a text file from a trigger like this CREATE TRIGGER ON tblApplications FOR INSERT AS DECLARE @FirstName varchar(75) DECLARE @LastName varchar(75) Declare...
7
by: Sjaak van Esdonk | last post by:
Hi all, i'm trying to find a solution for the following problem: I have two different database called A and B. On database A runs an application call AA. Some information from the database A...
0
by: JohnO | last post by:
Thanks to Serge and MarkB for recent tips and suggestions. Ive rolled together a few stored procedures to assist with creating audit triggers automagically. Hope someone finds this as useful as...
2
by: Wei Wang | last post by:
Hi, Can I call multiple functions in one trigger? Something like this: CREATE TRIGGER match_cond_name_generate BEFORE INSERT OR UPDATE ON public.predicate_index FOR EACH ROW EXECUTE...
2
by: Mage | last post by:
Hi, what's wrong with this? --- create table test (id int, name text, parent int); insert into test values (1,'a',1); insert into test values (2,'b',1); insert into test values (3,'c',1);
2
by: pillmill | last post by:
I replaced AddNew statments with INSERT INTO, but am unable to write to the same tables. Foreign keys violations are the main errors. Why are these occuring ? Before: set rs3=...
1
by: Murtaza | last post by:
Hi all Looking for assistance on an issue in Excel (2000 sp2 / pro) and access 2003. I have a database and in my VB code have created a ADODB.connection to it. It is called conn. I have used it...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
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...

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.