我需要得到一个确切的回答,我上面的VFP接口程序是否正确?有没有问题?
程序如下:
thisform.Edit1.Value =''
PUBLIC yinhaiobject as Object
ProgramID=ALLTRIM(thisform.text4.Value)
yinhaiobject= CREATEOBJECT("&ProgramID")
&&建立对象
&&yinhaiobject= CREATEOBJECT("YINHAI.SCMYINTERFACE")
&&建立对象
IF
TYPE('yinhaiobject')='O'
&& C字符型 D日期型 O 对像 G 通用型 L 逻辑型 M 备注型 N 数值型。。
PUBLIC
BusinessID As String
PUBLIC
Ctrlxml As String
PUBLIC
Dataxml As String
PUBLIC
Pcbh As String
PUBLIC
Businesssequence As String
PUBLIC
Businessvalidate As String
PUBLIC
Outputxml As String
PUBLIC
Appcode as Long
PUBLIC
Appmsg As String
BusinessID=""
Ctrlxml=""
Dataxml=""
Pcbh=""
Businesssequence=""
Businessvalidate=""
Outputxml=""
Appcode=0
Appmsg=""
BusinessID="01"
Ctrlxml ="" &&组织参数
Dataxml ="" &&组织参数
yinhaiobject.yh_interface_call(BusinessID,Ctrlxml,Dataxml,Pcbh,Businesssequence,Businessvalidate,Outputxml,Appcode,Appmsg)
thisform.Edit1.Value ='Program ID:'+ProgramID +' Business ID:'+BusinessID+' '+Pcbh+' '+Businesssequence+' '+Businessvalidate +' '+Outputxml+' '+Appmsg
yinhaiobject.DisconnectObject()
release
yinhaiobject
ELSE
Messagebox("接口连接失败!调用程序可能没有安装和注册。", 0, "系统提示")
ENDIF