﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / Trigger will not export to Excel Spreadsheet / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 02:11:52 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>As Steve said before, [b]DO NOT USE TRIGGER[/b] !!!!!</description><pubDate>Wed, 09 Jan 2008 08:24:14 GMT</pubDate><dc:creator>Loner</dc:creator></item><item><title>RE: Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>Hiya folks, thanks for your responses. So... does anybody know why the error[b]The current transaction could not be exported to the remote provider. It has been rolled back.[/b]is occurring and how we can fix it? That would be a problem solved.ThanksRob</description><pubDate>Wed, 09 Jan 2008 07:39:58 GMT</pubDate><dc:creator>rclarkson</dc:creator></item><item><title>RE: Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>In MS Excel go to Data -&amp;gt; Import External Data -&amp;gt; New Database Query.Follow instructions in the wizard to create a query to your database.</description><pubDate>Tue, 08 Jan 2008 19:41:39 GMT</pubDate><dc:creator>Sergiy</dc:creator></item><item><title>RE: Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>Exporting to spreadsheet is "Death by SQL"... if someone opens it, BOOM!  Process in SQL is dead... period.</description><pubDate>Tue, 08 Jan 2008 18:45:56 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>I would create a table that holds a flag.Have your trigger set the flagSet up a schedule job that runs every minute or so with a task that saysIF EXISTS(SELECT 1 FROM dbo.FlagTable WHERE Flag=1)BEGINUPDATE dbo.FlagTable SET Flag=1exec your queryENDThe alternative is to have the trigger start your job but you need to put the check in place to detect if your job is running already.  There is a system management view for this but its name escapes me.</description><pubDate>Tue, 08 Jan 2008 12:47:37 GMT</pubDate><dc:creator>David.Poole</dc:creator></item><item><title>RE: Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>First, triggers are inside the transaction and putting something that needs external resources (send mail, openrowsource, etc.) is a bad idea. You are asking for lots of issues.Insert the row into a table and then periodically, even every minute, run an export with SSIS to throw this into your spreadsheet.</description><pubDate>Tue, 08 Jan 2008 09:07:30 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>Trigger will not export to Excel Spreadsheet</title><link>http://www.sqlservercentral.com/Forums/Topic440096-8-1.aspx</link><description>Hiya all, this is my first post here. I hope you can help me. I have a trigger attached to a table that will export data to an Excel spreadsheet when a record is inserted to that table. When I insert the record, I get the following error:[b]The current transaction could not be exported to the remote provider. It has been rolled back.[/b]The script I am using is below:Insert into OpenDataSource    (        'Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\ITTeam\Excel\Book1.xls;Extended Properties=Excel 8.0'    )    ...[Sheet1$]    SELECT * FROM CUSTOMERSI think the script is OK because it works when:1. I execute the script from a SqlClient.SqlCommand object within a VB .Net application2. If I place the script in a stored procedure and execute it from a VB .Net application.Thanks in anticipationRob</description><pubDate>Tue, 08 Jan 2008 08:43:26 GMT</pubDate><dc:creator>rclarkson</dc:creator></item></channel></rss>