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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-11-13 : 19:28:06
|
| Ivailo Jelezarski writes "I'm sorry but I don't know English very well.I hope that you can understend my question.Now i write client-server application with Borland C++ Builder 5.0.and Microsoft SQL Server 7.0. The server is NT Sever 4.0 with SP6.My program connecting throw the LAN with SQL Server. There is twoore more terminals using data base. I retrieve table on the serverin a String Grid in my application. I would like to learn when oneclient make a change in this table how the other clients can learn for this. My question is:How SQL Server send message to other therminals and how i can catchthis message in any instance of my application on that terminals?I've tried following:I create trigger FOR DELETE,INSERT,UPDATE on a problematic table.In that trigger using PRINT or RAISERROR i send message when there isa change in a table. I tried to catch this message using DB-Library for Cfunctions:DBERRHANDLE_PROC dberrhandle(DBERRHANDLE_PROC err_handler );DBMSGHANDLE_PROC dbmsghandle (DBMSGHANDLE_PROC msg_handler );There's no effect.Then I tried create extended store procedure using Visual C++6.0.This procedure send message using int srv_sendmsg (SRV_PROC * srvproc, int msgtype, DBINT msgnum, DBTINYINT class, DBTINYINT state, DBCHAR * rpcname, int rpcnamelen, DBUSMALLINT linenum, DBCHAR * message, int msglen );I successfully create this procedure. I again tried send message withit - failure. This SRV_PROC * srvproc is the handle for a particular client connection and send the message only to that terminal who ismade a change. The others?Any information about this problem is very imporant for me.Thank you in advance!" |
|
|
|
|
|