private void sendmsg () {System.Data.OleDb.OleDbConnection myconn = new OleDbConnection ( "Provider = SQLOLEDB; User Id = sa; password =; DataSource = 172.26.230.14; initial catalog = eAB-UC"); myconn.Open ( ); DataSet DS = New DataSet (); OLEDBDataAdapter myadap = new oledbdataadapter ("SELECT TOP 5 * from S_Khxx", MyConn); MyAdap.Fill (DS, "Details"); myconn.close ();
// Sound queue object and message object system.Messaging.MessageQueueTransaction objtran = new messagequeueTransAn (); system.Messaging.Message Objmsg = new system.MESSAGING.MESSAGE ();
Objtran.begin (); objmsg.label = "0000011111"; objmsg.body = DS;
System.Messaging.MessageQueue objque = new System.Messaging.MessageQueue ( "FormatName: DIRECT = TCP: 172.26.230.95//private $ // 22222send"); objque.Send (objMsg, objtran); objtran.Commit ();
}