电脑与信息技术
電腦與信息技術
전뇌여신식기술
COMPUTER AND INFORMATION TECHNOLOGY
2012年
4期
49-51
,共3页
Ⅵsual%c++%Microsoft%Foundation%Class(MFC)%数据库应用编%AddNew%AcfiveX数据绑定控件%AcfiveX%Da组%Objecu(ADO)
Ⅵsual%c++%Microsoft%Foundation%Class(MFC)%數據庫應用編%AddNew%AcfiveX數據綁定控件%AcfiveX%Da組%Objecu(ADO)
Ⅵsual%c++%Microsoft%Foundation%Class(MFC)%수거고응용편%AddNew%AcfiveX수거방정공건%AcfiveX%Da조%Objecu(ADO)
Visual c++%Microso Foundation Class (MFC)%DataBase Application programming%AddNew%ActiveX bindingdata control%ActiveX Data Objects (ADO)
MFC数据库应用编程时,主要使用应用程序向导产生的记录集类和记录视类,或者使用MFC类库提供的有关类两种方式编程,没有充分利用现有的ActiveX控件。因为许多ActiveX绑定数据控件与ADO数据控件不能自动协调工作即不能正确显示数据,如TextBox、DataCombo及DTPICKER;有一些ADO控件方法在对应的访问对象中没有提供,如不带参数的AddNew方法。手工绑定数据控件方式使ActiveX控件之间失去的自动协调得以恢复。使用ActiveX控件编程,代码的重用性大大提高,程序界面质量进一步的好转。
MFC數據庫應用編程時,主要使用應用程序嚮導產生的記錄集類和記錄視類,或者使用MFC類庫提供的有關類兩種方式編程,沒有充分利用現有的ActiveX控件。因為許多ActiveX綁定數據控件與ADO數據控件不能自動協調工作即不能正確顯示數據,如TextBox、DataCombo及DTPICKER;有一些ADO控件方法在對應的訪問對象中沒有提供,如不帶參數的AddNew方法。手工綁定數據控件方式使ActiveX控件之間失去的自動協調得以恢複。使用ActiveX控件編程,代碼的重用性大大提高,程序界麵質量進一步的好轉。
MFC수거고응용편정시,주요사용응용정서향도산생적기록집류화기록시류,혹자사용MFC류고제공적유관류량충방식편정,몰유충분이용현유적ActiveX공건。인위허다ActiveX방정수거공건여ADO수거공건불능자동협조공작즉불능정학현시수거,여TextBox、DataCombo급DTPICKER;유일사ADO공건방법재대응적방문대상중몰유제공,여불대삼수적AddNew방법。수공방정수거공건방식사ActiveX공건지간실거적자동협조득이회복。사용ActiveX공건편정,대마적중용성대대제고,정서계면질량진일보적호전。
MFC database application programming ways are mostly the one using the classes of recordset and view created by application wizard and the another using related classes provided by MFC library. Because many displaying data controls can not coordinate with data control automatically in MFC, it is that displaying data controls can not show the data rightly, available ActiveX controls are not fidly made use of in the two programming ways, such as TextBox,DataCombo as well as DTPICKER. controls, some ADO data control's methods is not implemented by ADO access object, such as the AddNew method with no parameter. By the way of manual programming of binding data to controls, the lost automatic harmony within the controls is restored. The Progranmming fully with ActiveX controls increases code reusability and causes application interaction quality to be gotten better further.