dbTalk Databases Forums  

Using ADO AddNew and my simple trigger won't execute

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Using ADO AddNew and my simple trigger won't execute in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mwob
 
Posts: n/a

Default Using ADO AddNew and my simple trigger won't execute - 05-08-2006 , 09:00 AM






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!


Reply With Quote
  #2  
Old   
Mwob
 
Posts: n/a

Default Re: Using ADO AddNew and my simple trigger won't execute - 05-08-2006 , 09:51 AM






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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.