?
Solved

Service and database table

Posted on 2009-04-03
4
Medium Priority
?
144 Views
Last Modified: 2012-05-06
I have a sql server 2005 database and I want to keep track of 1 table with 3 fields (Number, Name, Status) in it. For example is a record is inserted into this table with a status of 1 then I want to generate a xml based on the information for that record in the table. If the status is other than 1 I do not need to worry about it. I have heard I would probably need to develop a vb service to do this, any thoughts or suggestions would be very helpful. Also any ideas requireing code would have to be in vb.net 2005. Again I thank you for any help offered in advance.
0
Comment
Question by:lothos123452000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:CraigYellick
ID: 24065544
A trigger will handle the part about "when a record is inserted". The FOR XML clause will handle the creation of an XML document based on the inserted record. Neither of these require a service.

What do you want to do with the XML document once it is created? That might require a service but more likely a CLR procedure with appropriate permissions can do just about anything.
0
 

Author Comment

by:lothos123452000
ID: 24069151
Once the xml is created I need to post it, using https: to a third party who is initially inserting the record to let them know it was inserted successfully. Perhaps your right a CLR would do the trick, but would I just create a job on the sql server to run the clr every minute or did you have something else in mind.
0
 
LVL 11

Accepted Solution

by:
CraigYellick earned 2000 total points
ID: 24069339
Depends how often this event will happen. A CLR trigger procedure could do the whole thing, but could be a problem if there are many inserts and the targer HTTPS server responds slowly or is down.  For the long term you are right, it would be best to batch this up with a process that can handle a large number of inserts and be separate from sending the acknowledgement.

Rather than reacting to the insert you could have a flag in the table that defaults to indicating the need to be processed. When the SQL job runs it looks for the flag and processes records.  You could still use a CLR procedure to keep this all inside SQL Server and not be dependent on outside services. If you ever move the database to another server it will move along with it.

0
 

Author Closing Comment

by:lothos123452000
ID: 31566455
Thanks for the suggestions and the help I appreciate it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question