Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
serdem
Starting Member
3 Posts |
Posted - 2005-09-08 : 07:41:16
|
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 belowCREATE TRIGGER [stokguncelle] ON [dbo].[Stok] FOR INSERT, UPDATE, DELETE ASexec 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
15732 Posts |
Posted - 2005-09-08 : 07:58:26
|
See reply here:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54244 |
|
|
serdem
Starting Member
3 Posts |
Posted - 2005-09-08 : 11:23:44
|
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. |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-09-08 : 12:13:25
|
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. |
|
|
serdem
Starting Member
3 Posts |
Posted - 2005-09-12 : 07:59:07
|
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. |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-09-12 : 09:01:53
|
execute it manually to ensure it's still working.then cross-check that the scheduler agent is alive. |
|
|
MFCGuy
Starting Member
1 Post |
Posted - 2005-10-05 : 01:11:52
|
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. |
|
|
|
|
|