Can you make a call to a C++ Application from MS SQL Server?
Is it possible to make a call/notification to a C++ application from Microsoft SQL Server?
To give a broader understanding of what I'm trying to achieve: our database is being updated with new information; Whenever a new piece of information is received, we'd like to push this to the C++ application so that its dashboard reflects up-to-date data for the user.
We know we can do this by having the C++ application polling the database but I see this as inefficient architecture and would like to have SQL push the information or a notification to C++.
An开发者_如何学Cy light shed on this area is greatly appreciated!
----- 28th Jan 3:40pm ----
OK After some reading around on Service Broker External Activation it seems like the right technology to use; however it seems to technology that's introduced in SQL Server 2008; and unfortunately we're using SQL Server 2005. Are there any other suggestive technologies or architectural designs we could use?
You might want to look in to using the Service Broker and handling the events it queues. Here's MSDN: http://msdn.microsoft.com/en-us/sqlserver/cc511479.aspx
There is an alternative, you don't need the app to poll the database, you can create a trigger for the table which sends a message to your application whenever something changes. this would be the more straightforward (and safer) approach
Look at this
Try using xp_cmdshell
. It's not something I'd do lightly, and I would definitely make sure you're NOT letting anything access the SQL box with sysadmin rights. Create a stored proc which can EXECUTE AS a sysadmin user, and run xp_cmdshell from there. You'll still need to enable it though...
精彩评论