473,563 Members | 2,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fire an SQL Server Trigger on a Bulk Upload

14 New Member
Hello,

Does anyone know how to get a trigger to fire while you are uploading multiple records into a SQL Server 2005 Express DB using the DTS Wizard?

On insert of a person's record I want the trigger to find their id# from another table and update their information accordingly.

I have the trigger built, but it will not fire when I use the DTS Wizard.

Please help. Thanks.
Sep 18 '08 #1
7 6368
ck9663
2,878 Recognized Expert Specialist
Read more here. The doc did not mention anything about SQL 2005 Express, though. But it might worth a try.

-- CK
Sep 18 '08 #2
srkidd12
14 New Member
What about when you execute the DTS Wizard? I am trying to insert new rows and update the information in other tables using the triggers. The triggers will not fire. Any ideas. I'm searching the Web up and down.

Thanks for your help.
Sep 19 '08 #3
Delerna
1,134 Recognized Expert Top Contributor
Why would't you extend the insert query so that it obtains the ID at the same time as inserting the record? You wouldn't need a trigger then.
Sep 19 '08 #4
srkidd12
14 New Member
Why would't you extend the insert query so that it obtains the ID at the same time as inserting the record? You wouldn't need a trigger then.
I am not using a query. I am using the dts wizard that came with SQL Server 2005 Express.

You wouldn't know how to get the trigger to fire in that instance would you?

I may have to look at the bulk insert function.
Sep 19 '08 #5
ck9663
2,878 Recognized Expert Specialist
I think DTS is using bcp, not BULK INSERT. Which means, by default, triggers are disabled.

-- CK
Sep 19 '08 #6
Delerna
1,134 Recognized Expert Top Contributor
I am not using a query. I am using the dts wizard that came with SQL Server 2005 Express.
Thanks for your help.

Sorry bad wording on my part. Yes, you are using DTS but DTS is using query in the data pump to select the records from the destination and/or insert them into a table in your database.

What I meant by extending the query (bad wording... should have said extend the DTS) was to
Add an 'on success' workflow pipe onto the destination server and attatch it to an SQL task so that the SQL Task executes when the data pump transfer is successful.

In the SQL task you place the code that your trigger would execute

That was hard to explain, I hope I am making sense?

Also, just noticed you are using SQL Express. Not had any experience with express. Does it have that sort of control over DTS ?
Sep 21 '08 #7
srkidd12
14 New Member
I did get the triggers to fire on the Bulk Insert. Thanks for all of the help guys.
Sep 29 '08 #8

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

Similar topics

4
2767
by: bmccollum | last post by:
I have written a trigger that's supposed to go out and delete corresponding records from multiple tables once I delete a specific record from a table called tblAdmissions. This does not work and I'm not sure why... Here's the code that's supposed to run, let's say, if a user (via a VB 6.0 interface) decides to delete a record. If the...
1
1369
by: Azkaban | last post by:
Hi, are there someone who know what kind of control or component Share Point Portal Server use to make bulk upload documents? Thanks. -- --------------------------------- Filippo Macchi www.filippomacchi.it
4
3619
by: d0wsdkn02 | last post by:
I have an ASP.NET application that performs ADO.NET commands that cause triggers to be run in SQL Server 2000. My question is how would I best access the user ID from my custom .NET Principal in the trigger (the trigger stores audit information and needs the user ID)? I'm using the same SQL Server user/pass on every connection to...
5
1662
by: John Smith | last post by:
I have tables that I want to fire either an update or insert trigger on. I could write a script containing a long list of inserts but I'm looking for something simpler. Would isql work? Any special conditions to get it to work? I've tried tricks like 'update x set col = col' or 'update x set col = col + '' ' All the alternatives seem...
1
2238
by: ABC | last post by:
Our environment has two servers, one is web and another is SQL Server. I can write upload file to IIS. But, I cannot call SQL Server's BULK Insert statement. Is there any idea to handle this case?
2
20726
by: dba_222 | last post by:
Dear Experts, I'm an Oracle guy, who is being given more SQL Server assignments lately. I've been looking for things on the web about this, but I can't anything so far. In Oracle, I you can create a trigger on a table that -only- fires if
3
7667
by: Davor | last post by:
I'm trying to import data from flat file in table and have few problems. 1. Field Delimiter is ',' (comma). If ',' occurs in quoted string it is still treated as field delimiter. This is BUG or ? 2. In table I have datetime field that can be null, but bulk insert reports error if in flat file is null or ''. It's OK only when real date is...
9
2726
by: steven | last post by:
Does anyone know how to do the following. I'm trying to mimic replication with triggers. I have 2 databases, each have these 2 tables. 1. USERS ID int NAME varchar(20)
7
6661
by: Tempalli | last post by:
Kindly help me how to upload a bulk of data in ms access. In table1 i am having only ReferenceNo's. In table2 iam having ReferenceNo's,Name,Place,Area. I have to upload the Bulk data of the table2 against the referenceNo in table1. Kindly help me. Ananth
0
7664
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...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
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...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1198
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.