Re: File Open

From: Rick Sawtell (quickening_at_msn.com)
Date: 02/15/05


Date: Tue, 15 Feb 2005 13:41:36 -0600


"Me" <Me@discussions.microsoft.com> wrote in message
news:09CD669D-4E60-44C6-AFD2-3F2385AEFDC2@microsoft.com...
>I wanted to find out how to open a file in a Trigger?
> I have a need to open a file, write some information
> when trigger fires and then close it.
>
> Thank you,
> -Me
>

I'm not sure if this will work from within a Trigger, but you can take a
look at the xp_cmdshell stored procedure. Another option might be to create
a COM object (or .NET object in a COM wrapper) and use the sp_OA* stored
procedures to instantiate the object and call it's methods.

Rick Sawtell
MCT, MCSD, MCDBA



Relevant Pages

  • Re: chooses not to generate code at all
    ... >>>DBMS is so that the DBMS engine can execute it when triggered by some ... If there is no trigger, ... Stored procedure is one thing. ... > If the procedure execution is not triggered by DBMS ...
    (comp.object)
  • Re: Insert Error 30014
    ... of @@identity before the stored procedure finish: ... the trigger. ... I have a form where I want to have underlying record source of a single ... EventId ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Insert Error 30014
    ... of @@identity before the stored procedure finish: ... the trigger. ... >> I have a form where I want to have underlying record source of a>> single ... >> EventId ...
    (microsoft.public.access.adp.sqlserver)
  • RE: How do I schedule transactions in SQL Server?
    ... The database will consist of a Master table of the payments ... Service which will call a stored procedure in SQL (which ... the trigger will kick in when ever the master table above is modified (or a ... > Database Administrator ...
    (microsoft.public.sqlserver.server)
  • A few T-SQL questions...
    ... I have a few T-SQL questions that i'm hoping someone can answer for me. ... trips (i'm not using a stored procedure for this for several reasons). ... What's the best way to write an update statement so that only fields ... I have a table that has a trigger that does ...
    (microsoft.public.sqlserver)