Re: Question: Triggers

From: VB Programmer (growNO-SPAM_at_go-intech.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 13:33:38 -0500

I guess I could have a VB.NET time that constantly checks the value of a fields to see if it's changed. Is this the best way? Very efficient? Thanks!
  "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message news:ubBlULw%23DHA.808@TK2MSFTNGP12.phx.gbl...
  Could your VB.NET app not check for the existence of rows in a table via a stored proc?

  --
  Tom

  ---------------------------------------------------------------
  Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
  SQL Server MVP
  Columnist, SQL Server Professional
  Toronto, ON Canada
  www.pinnaclepublishing.com/sql

  "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message news:#2h54Iw#DHA.3032@TK2MSFTNGP10.phx.gbl...
  I have a VB.NET application which searches for the existence of these "trigger" files. When it sees the file it does alot of logic, then sends out emails (based on the logic). After, the file is deleted.
    "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message news:OjXVyEw%23DHA.2576@tk2msftngp13.phx.gbl...
    What is the purpose of the file? How will it be used? If you are using this as some sort of data feed, I'd be more tempted to use the trigger to populate a table and then extract the table via bcp or DTS to a file and ship the file.

    --
    Tom

    ---------------------------------------------------------------
    Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
    SQL Server MVP
    Columnist, SQL Server Professional
    Toronto, ON Canada
    www.pinnaclepublishing.com/sql

    "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message news:uONCc6v#DHA.3120@TK2MSFTNGP11.phx.gbl...
    It only contains a numeric value.

    For example, if field A changes to 1 I'll put 50 in the file. The name of
    the file will be the rowid column. If field B changes to 1 I'll put 30 in
    the file. Etc...

    "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote in
    message news:OqQPtyv%23DHA.552@TK2MSFTNGP11.phx.gbl...
> What should the file contain?
>
> You could create a cursor which loops the inserted table inside the
    trigger
> and for each row use xp_cmdshell to execute some "DOS" command which
    creates
> the file.
>
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
    http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
>
> "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> news:esMAndv%23DHA.3272@TK2MSFTNGP09.phx.gbl...
> > I am new to SQL Server. Whenever a field in a database table changes
    from
> 0
> > to 1 I want to automatically create a text file in my C:\Temp\Trigger
> > directory. The filename is the id of the row.
> >
> > Can I do this using a SQL Trigger? What do you suggest?
> >
> > (My main development environment is VS.NET.)
> >
> >
>
>



Relevant Pages

  • Re: Trigger Question
    ... Pro SQL Server 2000 Database Design - ... I just decided that if my trigger for delete was ... >> SQL Server MVP ... >>> UPDATE OrderDetail ...
    (microsoft.public.sqlserver.programming)
  • Re: Question: Triggers
    ... Shelling out to the OS is not a quick thing to do inside a trigger. ... Tibor Karaszi, SQL Server MVP ... I have a VB.NET application which searches for the existence of these ...
    (microsoft.public.sqlserver.server)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.sqlserver.programming)
  • Re: Profiling error message 208: sorting the wheat from the chaff
    ... Profile load to a file then load the> file to a table or have Proviler load to a table directly. ... > SQL Server MVP ...
    (microsoft.public.sqlserver.server)

Loading