Mubashir Khan
3/22/2007 10:57:00 AM
this is exactly what i am planning to do in my future project.
i may provide you some info on this ...
you need to write a com wrapper around MSMQ api and use it in sql through
SP_OA procedures. Microsoft does provide com wrapper for msmq, i remember
sendmessage method expects variant type and i was unable to figure out what
sqltype to use for this ... so its better to write your own com.
secondly u should use MSMQ api or MSMQ COM provided by microsoft in ur
application and recieve messages asynchronously.
Do not use trigger to post message to msmq ... it is possible ... but it is
going to get troublesome... insert/update operations are going to get slower
and may fail ... intead make an sp to call com and call this sp from the
place records are inserted/updated if possible e.g. dts .... or make a sql
job to monitor records and call sp
add a requery time to ur app but a long interval .... say 10 mins ... so
that just in case there is some problem with msmq ... ur app is still
getting the record ... this is the contingency plan ....
<z1hou1@gmail.com> wrote in message
news:1174538615.510086.190230@p15g2000hsd.googlegroups.com...
> Hi,
> I have a situation where I have to poll the SQL Server 2000 database
> for certain rows with a particular status. I would like to avoid
> polling, but for now it seems and easy way out.
>
> Would it be possible for a trigger on the table to post a message on a
> queue, in this case MSMQ and can T-SQL be used to poll the MSMQ?
>
> Regards,
> z1hou1
>