SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Other Development Tools
 execute an exe file using trigger
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

serdem
Starting Member

3 Posts

Posted - 09/08/2005 :  07:41:16  Show Profile  Reply with Quote
Hi. I developed a visualbasic program which transfers data from ms sql server to access database. When I run this program stand alone there is no problem. but I want to run this program by using a trigger. When a data inserted,deleted or updated in sql server table I want my trigger to execute this vb program.If I put this program and access database(which I want to transfer datas to) to the same computer which the sql server has been installed there is no problem again. but I have to put the access database to another computer on the network. I wrote the trigger below
CREATE TRIGGER [stokguncelle] ON [dbo].[Stok]
FOR INSERT, UPDATE, DELETE
AS
exec master..xp_cmdshell 'c:\sqlbaglanti\guncelle.exe'
when I update table there is no transfer,no error message. Is there any other command for triggers to execute a file on the network?
Please Help me I will be pleased...


robvolk
Most Valuable Yak

USA
15688 Posts

Posted - 09/08/2005 :  07:58:26  Show Profile  Visit robvolk's Homepage  Reply with Quote
See reply here:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54244
Go to Top of Page

serdem
Starting Member

3 Posts

Posted - 09/08/2005 :  11:23:44  Show Profile  Reply with Quote
thank you for you interest. I tried to use DTS. I want DTS to copy datas to another access database ever 5 min but only the first time DTS copied but never again. I waited 5 min but nothing changed.
Go to Top of Page

AndrewMurphy
Flowing Fount of Yak Knowledge

Ireland
2916 Posts

Posted - 09/08/2005 :  12:13:25  Show Profile  Reply with Quote
Did you schedule it on the scheduler?
Would it have a problem with duplicate records?

Put some kind of 'simple' logging into the DTS package to see what steps are being executed.
Go to Top of Page

serdem
Starting Member

3 Posts

Posted - 09/12/2005 :  07:59:07  Show Profile  Reply with Quote
yes I scheduled it. But as I said before only the first time records were transfered but never again. I dont think it is because of duplicate records because I deleted all of the records after DTS transfered them. And I waited 5 minutes(shedule time) but there was no change in my database. And I couldnt find where the problem is.
Go to Top of Page

AndrewMurphy
Flowing Fount of Yak Knowledge

Ireland
2916 Posts

Posted - 09/12/2005 :  09:01:53  Show Profile  Reply with Quote
execute it manually to ensure it's still working.
then cross-check that the scheduler agent is alive.
Go to Top of Page

MFCGuy
Starting Member

Philippines
1 Posts

Posted - 10/05/2005 :  01:11:52  Show Profile  Reply with Quote
Hello. I also tried to execute a dummy exe application written in vc++/mfc in the trigger (for update) as what serem did but mine just hang the Enterprise Manager when I did the data editing there. If this is a success I am planning to make a server application that sends real time update messages for all the client programs that use the database/table. The .exe application in the trigger should send message to the server application which in turn will broadcast messages to all the client applications to update their data. I just don't know how to make the exe file run in the trigger. Please help, SQL Server gurus! Im running the SQL Server 2000 (developer install) in my pc on Windows 2003 Server.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000