delphi客户端连接IBM MQ

时间:2022-01-10 07:47:01

标签:

项目需要:his-lis之前交互以表/视图BS方法完成交互,,现需要改换成用IBM MQ动静平台的方法完成交互。

改削后的交互:

delphi客户端连接IBM MQ

部署测试环境:

Windows2003+Windows xp+IBM MQ 7.0.5


具体实现法式:

部署MQ客户端,delphi连接IBM MQ需要MQ客户端撑持;

部署MQ处事端;

delphi客户端连接IBM MQ

delphi客户端连接IBM MQ

delphi客户端连接IBM MQ

delphi客户端连接IBM MQ

delphi客户端连接IBM MQ

delphi客户端连接IBM MQ




delphi客户端编写;

窗体源码:

object Form1: TForm1   Left = 744   Top = 189   BorderIcons = [biSystemMenu, biMinimize]   BorderStyle = bsSingle   Caption = #26041#27491'HIS_IBM MQ'#28040#24687#23458#25143#31471#27979#35797#24037#20855'_By '#35199#21335#21306' '#23002#28023#26093   ClientHeight = 480   ClientWidth = 826   Color = clBtnFace   Font.Charset = DEFAULT_CHARSET   Font.Color = clWindowText   Font.Height = -11   Font.Name = 'MS Sans Serif'   Font.Style = []   Icon.Data = {     0000010001002020000001002000A81000001600000028000000200000004000     0000010020000000000000100000120B0000120B000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000003535FF000000FF000303FF960202     FF7F0000FF000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000007272FF000000FF000404FF860505     FF770000FF000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     000000000000000000000000000000000000000000000000FF000303FF790202     FF710000FF000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     000000000000000000000000000000000000000000000000FF000202FF6F0202     FF6D0000FF000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     000000000000000000000000000000000000FEFEFF000000FF000202FF6B0101     FF6B0000FF00FEFEFF0000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     000000000000000000000000000000000000A2A2FF000000FF000505FF100808     FF110808FF081A1AFF020303FF001F1FFF00000000000101FF000202FF680101     FF690101FF00000000001F1FFF000303FF001A1AFF020808FF080808FF110505     FF100000FF00A2A2FF0000000000000000000000000000000000000000000000     000000000000000000000000000000000000A4A4FF000000FF000202FF6C0101     FFCF0101FFBD0303FFA10303FF7A0202FF650303FF4E0202FF3A0101FF8C0202     FF8F0303FF3A0303FF4E0202FF650303FF7A0303FFA10101FFBD0101FFCF0202     FF6C0000FF00A4A4FF0000000000000000000000000000000000000000000000     000000000000000000000000000000000000000000000202FF000404FF460000     FFF40000FFFF0000FFFF0000FFFF0000FFFF0000FFFA0000FFF50000FFF90000     FFFA0000FFF50000FFFA0000FFFF0000FFFF0000FFFF0000FFFF0000FFF40404     FF460202FF000000000000000000000000000000000000000000000000000000     000000000000000000000000000000000000000000000303FF000404FF210101     FFE10000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0101FFE10404     FF210303FF000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000303FF000505FF0B0101FF800000     FFF90000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFF90101     FF800505FF0B0303FF0000000000000000000000000000000000000000000000     00000000000000000000000000000202FF000303FF150101FF980000FFF90000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFF90101FF980303FF150202FF00000000000000000000000000000000000000     0000000000002020FF000000FF000404FF250101FFB00000FFFD0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFD0101FFB00404FF250000FF002020FF0000000000000000000000     00000C0CFF000000FF000303FF390101FFCA0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0101FFCA0303FF390000FF000C0CFF00000000000606     FF000B0BFF020303FF500101FFDC0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0101FFDC0303FF500B0BFF020606FF000909     FF070202FF690000FFEB0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFEB0202FF690909FF070202     FF860000FFF30000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFF30202FF860303     FF3D0101FF9C0000FFF80000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFF80101FF9C0303FF3D0505     FF000606FF1F0101FFDF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0101FFDF0606FF1F0505FF000303     FF000404FF430000FFF30000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFF30404FF430303FF000000     FF000202FF790000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFD0101FFDC0000FFF20000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFF20101FFDC0000FFFD0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0202FF790000FF001111     FF070202FFAD0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0101FFBA0505FF280101FFAE0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0101FFAE0505FF280101FFBA0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0202FFAD1111FF070505     FF280101FFE00000FFFF0101FFF20101FFCF0000FFD10000FFFD0000FFFF0101     FFCF0202FF2A0909FF0C0101FFC30000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0101FFC30909FF0C0202FF2A0101FFCF0000     FFFF0000FFFD0000FFD10101FFCF0101FFF20000FFFF0101FFE00505FF280606     FF320303FF870303FF5F0404FF3A0A0AFF130404FF2E0101FFE30000FFDE0303     FF3E0000FF000505FF220101FFE20000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0101FFE20505FF220000FF000303FF3E0000     FFDE0101FFE30404FF2E0A0AFF130404FF3A0303FF5F0303FF870606FF321212     FF021515FF021313FF00000000000808FF000707FF080202FF9E0303FF540000     FF000303FF000404FF3A0000FFF20000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFF20404FF3A0303FF000000FF000303     FF540202FF9E0707FF080808FF00000000001313FF001515FF021212FF020000     00000000000000000000000000002C2CFF001313FF010606FF1A0404FF050505     FF000000FF000505FF5E0000FFFD0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFD0505FF5E0000FF000505FF000404     FF050606FF1A1313FF012C2CFF00000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000003B3B     FF000000FF000202FF8F0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0202FF8F0000FF003B3BFF000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000909     FF000C0CFF050101FFAF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFF0000FFFF0000FFFF0101FFAF0C0CFF050909FF000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000707     FF000707FF110101FFCC0000FFFF0000FFF80000FFFE0000FFFF0000FFFF0000     FFFF0000FFFF0000FFFE0000FFF80000FFFF0101FFCC0707FF110707FF000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000303     FF000404FF310101FFCE0202FF830303FF480101FFC70000FFFF0000FFFF0000     FFFF0000FFFF0101FFC70303FF480202FF830101FFCE0404FF310303FF000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000303     FF000505FF180404FF290B0BFF020000FF000303FF5A0000FFF80000FFFF0000     FFFF0000FFF80303FF5A0000FF000B0BFF020404FF290505FF180303FF000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     FF000000FF000000FF000000FF000606FF000707FF100101FFBB0000FFFF0000     FFFF0101FFBB0707FF100606FF000000FF000000FF000000FF000000FF000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000000000000000000000000000000000000000     0000000000000000000000000000C0C0FF000000FF000303FF550000FFF70000     FFF60303FF550000FF00C6C6FF00000000000000000000000000000000000000     000000000000000000000000000000000000000000000000000000000000FFFE     7FFFFFFE7FFFFFFE7FFFFFFE7FFFFFFE7FFFFE1E787FFE00007FFE00007FFE00     007FFC00003FF800001FF000000FE00000078000000100000000000000000000     000080000001800000018000000100000000000000000040020038C0031CF8C0     031FFFC003FFFF8001FFFF8001FFFF8001FFFF8811FFFFB81DFFFFFC3FFF}   OldCreateOrder = False   Position = poDesktopCenter   PixelsPerInch = 96   TextHeight = 13   object Label1: TLabel     Left = 8     Top = 8     Width = 80     Height = 19     Caption = #26381#21153#22120'IP'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label2: TLabel     Left = 286     Top = 8     Width = 100     Height = 19     Caption = #38431#21015#31649#29702#22120     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label3: TLabel     Left = 8     Top = 38     Width = 80     Height = 19     Caption = #26381#21153#31471#21475     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label4: TLabel     Left = 286     Top = 41     Width = 80     Height = 19     Caption = #38431#21015#21517#31216     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label5: TLabel     Left = 567     Top = 8     Width = 80     Height = 19     Caption = #36890#36947#21517#31216     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label6: TLabel     Left = 32     Top = 98     Width = 80     Height = 19     Caption = #23646#24615#21517#31216     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label7: TLabel     Left = 567     Top = 41     Width = 80     Height = 19     Caption = #29992#25143#26631#24535     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label8: TLabel     Left = 172     Top = 98     Width = 60     Height = 19     Caption = #23646#24615#20540     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label9: TLabel     Left = 8     Top = 378     Width = 160     Height = 19     Caption = 'replyToQueueName'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label10: TLabel     Left = 8     Top = 346     Width = 130     Height = 19     Caption = 'extend_sub_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label11: TLabel     Left = 8     Top = 314     Width = 130     Height = 19     Caption = 'order_exec_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label12: TLabel     Left = 8     Top = 282     Width = 110     Height = 19     Caption = 'send_sys_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label13: TLabel     Left = 8     Top = 250     Width = 120     Height = 19     Caption = 'exec_unit_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label14: TLabel     Left = 8     Top = 218     Width = 130     Height = 19     Caption = 'apply_unit_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label15: TLabel     Left = 8     Top = 186     Width = 90     Height = 19     Caption = 'domain_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label16: TLabel     Left = 8     Top = 154     Width = 100     Height = 19     Caption = 'service_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label17: TLabel     Left = 8     Top = 122     Width = 110     Height = 19     Caption = 'hospital_id'     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Label18: TLabel     Left = 8     Top = 72     Width = 80     Height = 19     Caption = #23383#31526#32534#30721     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False   end   object Memo1: TMemo     Left = 303     Top = 308     Width = 521     Height = 166     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     ScrollBars = ssBoth     TabOrder = 0   end   object Edit1: TEdit     Left = 90     Top = 4     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 1     Text = '192.168.188.130'   end   object Edit2: TEdit     Left = 90     Top = 36     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 2     Text = '1414'   end   object Edit3: TEdit     Left = 384     Top = 4     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 3     Text = 'QueueManger'   end   object Edit4: TEdit     Left = 384     Top = 36     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 4     Text = 'LocalQueue'   end   object Edit5: TEdit     Left = 649     Top = 4     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 5     Text = 'CONN'   end   object Edit6: TEdit     Left = 649     Top = 36     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 6     Text = 'hji116'   end   object Edit7: TEdit     Left = 157     Top = 122     Width = 140     Height = 21     TabOrder = 7     Text = '450960682'   end   object Edit8: TEdit     Left = 157     Top = 154     Width = 140     Height = 21     TabOrder = 8     Text = 'BS004'   end   object Edit9: TEdit     Left = 157     Top = 186     Width = 140     Height = 21     TabOrder = 9     Text = '0'   end   object Edit10: TEdit     Left = 156     Top = 218     Width = 140     Height = 21     TabOrder = 10     Text = '0'   end   object Edit11: TEdit     Left = 8     Top = 402     Width = 287     Height = 21     TabOrder = 11   end   object Edit13: TEdit     Left = 156     Top = 346     Width = 140     Height = 21     TabOrder = 12     Text = '0'   end   object Edit14: TEdit     Left = 156     Top = 314     Width = 140     Height = 21     TabOrder = 13     Text = '0'   end   object Edit15: TEdit     Left = 156     Top = 282     Width = 140     Height = 21     TabOrder = 14     Text = 'S005'   end   object Edit16: TEdit     Left = 156     Top = 250     Width = 140     Height = 21     TabOrder = 15     Text = '0'   end   object Button1: TButton     Left = 8     Top = 424     Width = 105     Height = 49     Caption = #21457#36865#28040#24687     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -21     Font.Name = #26032#23435#20307     Font.Style = [fsBold]     ParentFont = False     TabOrder = 16     OnClick = Button1Click   end   object Button2: TButton     Left = 187     Top = 424     Width = 105     Height = 49     Caption = #25509#25910#28040#24687     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -21     Font.Name = #26032#23435#20307     Font.Style = [fsBold]     ParentFont = False     TabOrder = 17     OnClick = Button2Click   end   object Memo2: TMemo     Left = 303     Top = 80     Width = 521     Height = 113     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     ScrollBars = ssBoth     TabOrder = 18   end   object Edit12: TEdit     Left = 90     Top = 67     Width = 161     Height = 27     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     TabOrder = 19     Text = '1381'   end   object Memo3: TMemo     Left = 303     Top = 195     Width = 521     Height = 113     Font.Charset = GB2312_CHARSET     Font.Color = clWindowText     Font.Height = -19     Font.Name = #26032#23435#20307     Font.Style = []     ParentFont = False     ScrollBars = ssBoth     TabOrder = 20   end end