• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 29,comments - 10,trackbacks - 0
            網(wǎng)上關(guān)于ADO的使用方法很多,這邊我個人就整理出一個使用ADO的方法的具體步驟:
            1
            #import引入ADO庫文件
            stdafx.h文件中添加#import "c:\program files\common files\system\ado\msado15.dll"no_namespaces rename("EOF" adoEOF") 

            2、 數(shù)據(jù)庫連接,創(chuàng)建CDBConnection,代碼如下:

            class CDBConnection  
            {
            public:
                
            //數(shù)據(jù)庫是否已連接
                BOOL m_Actived;
                
            //關(guān)閉連接
                void Close();
                
            //打開連接
                BOOL Open(CString CnnStr);

                
            //ADO的連接對象指針
                _ConnectionPtr m_pConn;

                CDBConnection();
                
            virtual ~CDBConnection();

            }
            ;
            CDBConnection::CDBConnection()
            {
                
            //創(chuàng)建連接對象
                m_pConn.CreateInstance("ADODB.Connection");
                m_Actived 
            = FALSE;
            }


            CDBConnection::
            ~CDBConnection()
            {
                
            //釋放連接對象
                m_pConn.Release();
            }


            BOOL CDBConnection::Open(CString CnnStr)
            {
                
            try
                 
            {
                    m_pConn
            ->Open(_bstr_t(CnnStr), """", adConnectUnspecified);

                    m_Actived 
            = TRUE;

                    
            return TRUE;
                }

                
            catch(_com_error &e)
                 
            {
                    
            return FALSE;
                }

            }


            void CDBConnection::Close()
            {
                
            if (m_Actived)
                 
            {
                    m_pConn
            ->Close();
                    m_Actived 
            = FALSE;
                }

            }

            相關(guān)函數(shù):
            1)HRESULT Connection15::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options )
                  ConnectionString例子:"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strCommandLine + "WhMgrDB.mdb;Persist Security Info=False"。其中strCommandLine 為數(shù)據(jù)庫的地址,WhMgrDB.mdb為所要用到的數(shù)據(jù)庫。
                  UserID和Password分別為建立連接時所使用的用戶名和密碼
                  Options:決定是使用同步方式(adConnectUnspecified默認)還是異步方式(adAsyncConnext)打開數(shù)據(jù)庫。當使用同步方式打開數(shù)據(jù)庫時,只有打開完成,Open方法才返回;而是用異步方式打開數(shù)據(jù)庫時,Open方法在建立連接完成之前就返回。
            3
            、 通用數(shù)據(jù)訪問模塊的實現(xiàn)

            class CDataSet  
            {
            protected:
                
            //打開查詢
                BOOL Open(CString SQL);
            public:
                
            //刪除當前記錄
                void Delete();
                
            //更新記錄
                void Update();
                
            //將Field列的值設置為Value
                void SetAsString(CString Field, CString Value);
                
            //關(guān)閉查詢
                void Close();
                
            //加載數(shù)據(jù)
                virtual BOOL LoadData();
                
            //得到Field列的值
                CString GetAsString(CString FieldName);
                
            //是否在第一條記錄之前
                BOOL IsBOF();
                
            //是否在最后一條記錄之后
                BOOL IsEOF();
                
            //移動到上一條記錄
                void MovePrevious();
                
            //移動到下一條記錄
                void MoveNext();
                
            //移動到最后一條記錄
                void MoveLast();
                
            //移動到第一條記錄
                void MoveFirst();

                
            //數(shù)據(jù)庫連接對象
                CDBConnection * m_cnn;

                CDataSet();
                
            virtual ~CDataSet();

            private:
                BOOL m_Actived;
                _RecordsetPtr m_pRs;
            }
            ;

            CDataSet::CDataSet()
            {
                m_pRs.CreateInstance(
            "ADODB.RecordSet");
                m_Actived 
            = FALSE;
            }


            CDataSet::
            ~CDataSet()
            {
                m_pRs.Release();
            }


            BOOL CDataSet::Open(CString SQL)
            {
                ASSERT(m_cnn);
                ASSERT(m_cnn
            ->m_Actived);
                
            try
                
            {
                    m_pRs
            ->Open(_variant_t(SQL), _variant_t(m_cnn->m_pConn, true), adOpenStatic, adLockOptimistic, adCmdText);
                
                    m_Actived 
            = TRUE;

                    
            return TRUE;
                }

                
            catch(_com_error &e)
                
            {
                    
            return FALSE;
                }

            }


            void CDataSet::MoveFirst()
            {
                m_pRs
            ->MoveFirst();
            }


            void CDataSet::MoveLast()
            {
                m_pRs
            ->MoveLast();
            }


            void CDataSet::MoveNext()
            {
                m_pRs
            ->MoveNext();
            }


            void CDataSet::MovePrevious()
            {
                m_pRs
            ->MovePrevious();
            }


            BOOL CDataSet::IsEOF()
            {
                
            return m_pRs->EndOfFile;
            }


            BOOL CDataSet::IsBOF()
            {
                
            return m_pRs->BOF;
            }


            CString CDataSet::GetAsString(CString FieldName)
            {
                ASSERT(
            !IsBOF() && !IsEOF());

                _variant_t vValue 
            = m_pRs->Fields->Item[_variant_t(FieldName)]->Value;

                
            //如果為空值則返回空
                if ((V_VT(&vValue) == VT_NULL) || (V_VT(&vValue) == VT_EMPTY))
                
            {
                    
            return "";
                }

                
            return _com_util::ConvertBSTRToString(_bstr_t(vValue));
            }


            BOOL CDataSet::LoadData()
            {
                
            return FALSE;
            }


            void CDataSet::Close()
            {
                
            if (m_Actived)
                
            {
                    m_pRs
            ->Close();
                }

            }


            void CDataSet::SetAsString(CString Field, CString Value)
            {
                ASSERT(
            !IsBOF() && !IsEOF());
                m_pRs
            ->Fields->Item[_variant_t(Field)]->Value = _variant_t(Value);
            }


            void CDataSet::Update()
            {
                m_pRs
            ->Update();
            }


            void CDataSet::Delete()
            {
                m_pRs
            ->Delete(adAffectCurrent);
            }

            相關(guān)函數(shù):
            1)HRESULT Recordset15::Open ( const _variant_t & Source, const _variant_t & ActiveConnection, enum CursorTypeEnum CursorType, enum LockTypeEnum LockType, long Options )
                  Source:變體型,計算Command對象的變量名、SQL語句、表名、存儲過程調(diào)用或持久Recordset文件名。
                  ActiveConnection:計算有效地Connection對象變量名或字符串,包含ConnectionString參數(shù)。
                  CursorType:確定提供者打開Recordset時應該使用的游標類型。
                  LockType:adLockReadOnly(默認值,只讀)、adLockPessimistic(保守式鎖定)、adLockOptimistic(開放式鎖定,只有使用Update時才鎖定記錄)、adLockBatchOptimistic(開放式批更新)
                  Options:有adCmdText、adCmdTable、adCmdTableDirect和adCmdStoredProc等。
            2)_variant_t vValue = m_pRs->Fields->Item[_variant_t(FieldName)]->Value;
                  _com_util::ConvertBSTRToString(_bstr_t(vValue));
                  m_pRs->Fields->Item[_variant_t(Field)]->Value = _variant_t(Value);
            4
             通用數(shù)據(jù)命令模塊的實現(xiàn)

            class CDBCommand  
            {
            public:
                
            //數(shù)據(jù)庫連接對象
                CDBConnection * m_cnn;
                
            //執(zhí)行SQL
                BOOL ExecuteSQL(CString SQL);
                CDBCommand();
                
            virtual ~CDBCommand();
            }
            ;

            CDBCommand::CDBCommand()
            {

            }


            CDBCommand::
            ~CDBCommand()
            {

            }


            BOOL CDBCommand::ExecuteSQL(CString SQL)
            {
                ASSERT(m_cnn);
                ASSERT(m_cnn
            ->m_Actived);
                
            try
                
            {
                    m_cnn
            ->m_pConn->Execute(_bstr_t(SQL), NULL, adCmdText);
                    
            return TRUE;
                }

                
            catch(_com_error &e)
                
            {
                    
            return FALSE;
                }

            }

            1)_RecordsetPtr Connection15::Execute ( _bstr_t CommandText, VARIANT * RecordsAffected, long Options )
                  CommandText:設置或返回包含提供者的命令。
                  RecordsAffected:可選,提供者向其返回操作所影響的記錄書目。
                  Options:有adCmdText、adCmdTable、adCmdTableDirect和adCmdStoredProc等。5、借用表命令類——CBorrowCommand(繼承了CDBCommand)

            #include "DBCommand.h"

            class CBorrowCommand : public CDBCommand  
            {
            public:
                
            //進行借用
                
            //返回值為借用號
                CString DoBorrow();
                
                
            //各項借用信息
                CString m_MaterialNum;
                CString m_Count;
                CString m_Department;
                CString m_Use;
                CString m_State;
                CString m_Jsr;
                CString m_Lqr;

                CBorrowCommand();
                
            virtual ~CBorrowCommand();

            private:
                
            //得到當前最大借用號
                int GetMaxBorrowID();

            }
            ;

            CBorrowCommand::CBorrowCommand()
            {

            }


            CBorrowCommand::
            ~CBorrowCommand()
            {

            }


            int CBorrowCommand::GetMaxBorrowID()
            {
                _RecordsetPtr pRs(
            "ADODB.RecordSet");
                pRs
            ->Open(_variant_t("Select Max(ID) as MAXID From tblBorrow"), _variant_t(m_cnn->m_pConn, true), adOpenStatic, adLockOptimistic, adCmdText);    
                
                
            int nResult;

                _variant_t vValue 
            = pRs->Fields->Item[_variant_t("MAXID")]->Value;
                
                
            //如果不為空,返回最大值;否則返回0
                if (V_VT(&vValue) != VT_NULL)
                
            {
                    nResult 
            = atoi(_bstr_t(vValue));    
                }

                
            else
                
            {
                    nResult 
            = 0;
                }

                
                pRs
            ->Close();
                
                
            return nResult;
            }


            CString CBorrowCommand::DoBorrow()
            {
                
            //得到當前時間
                CString strData;
                CTime time 
            = CTime::GetCurrentTime();
                strData.Format(
            "%d-%d-%d %d:%d:%d"
                    time.GetYear(), 
                    time.GetMonth(), 
                    time.GetDay(),
                    time.GetHour(),
                    time.GetMinute(),
                    time.GetSecond());

                CString strSQL;

                
            //得到新的借用ID
                int nMaxID = GetMaxBorrowID();
                nMaxID
            ++;
                CString strNewID;
                strNewID.Format(
            "%d", nMaxID);

                strSQL 
            = "Insert into tblBorrow([ID], [MaterialNum], [Count], [Department], [Data], [Use], [State], [Jsr], [Lqr]) Values("
                    
            + strNewID + "" 
                    
            + m_MaterialNum + "" 
                    
            + m_Count + ", \"" 
                    + m_Department + "\", #" 
                    + strData + "#, \""
                    + m_Use + "\", \""
                    
            + m_State + "\", \""
                    
            + m_Jsr + "\", \""
                    
            + m_Lqr + "\")";

                
            if(ExecuteSQL(strSQL))
                
            {
                    
            return strNewID;
                }

                
            else
                
            {
                    
            return "";
                }

            }

             6、借用表訪問類——CBorrowDataSet(繼承了CDataSet)

            #include "DataSet.h"

            class CBorrowDataSet : public CDataSet  
            {
            public:
                CString GetID();
                CString GetMaterialNum();
                
            void SetCount(CString Value);
                CString GetCount();
                CString GetUse();
                CString GetLqr();
                CString GetState();
                CString GetData();
                CString GetDepartment();
                CString GetJsr();

                BOOL LoadDataByID(CString ID);
                BOOL LoadData();
                CBorrowDataSet();
                
            virtual ~CBorrowDataSet();
            }
            ;

            CBorrowDataSet::CBorrowDataSet()
            {

            }


            CBorrowDataSet::
            ~CBorrowDataSet()
            {

            }


            BOOL CBorrowDataSet::LoadData()
            {
                
            return Open("Select * From tblBorrow");
            }


            BOOL CBorrowDataSet::LoadDataByID(CString ID)
            {
                
            return Open("Select * From tblBorrow Where ID = " + ID);
            }


            CString CBorrowDataSet::GetCount()
            {
                
            return GetAsString("Count");
            }


            void CBorrowDataSet::SetCount(CString Value)
            {
                SetAsString(
            "Count", Value);
            }


            CString CBorrowDataSet::GetMaterialNum()
            {
                
            return GetAsString("MaterialNum");
            }


            CString CBorrowDataSet::GetID()
            {
                
            return GetAsString("ID");
            }


            CString CBorrowDataSet::GetJsr()
            {
                
            return GetAsString("Jsr");
            }


            CString CBorrowDataSet::GetDepartment()
            {
                
            return GetAsString("Department");
            }


            CString CBorrowDataSet::GetData()
            {
                
            return GetAsString("Data");
            }


            CString CBorrowDataSet::GetState()
            {
                
            return GetAsString("State");
            }


            CString CBorrowDataSet::GetLqr()
            {
                
            return GetAsString("Lqr");
            }


            CString CBorrowDataSet::GetUse()
            {
                
            return GetAsString("Use");
            }

            7、用戶信息表訪問類——CUserInfoDataSet(繼承了CDataSet)

            #include "DataSet.h"

            class CUserInfoDataSet : public CDataSet  
            {
            public:
                
            //得到密碼
                CString GetPassword();
                
            //根據(jù)用戶名加載數(shù)據(jù)
                BOOL LoadData(CString UserName);

                CUserInfoDataSet();
                
            virtual ~CUserInfoDataSet();

            }
            ;

            CUserInfoDataSet::CUserInfoDataSet()
            {

            }


            CUserInfoDataSet::
            ~CUserInfoDataSet()
            {

            }


            BOOL CUserInfoDataSet::LoadData(CString UserName)
            {
                
            return Open("Select * From UserInfo Where Username like \"" + UserName + "\"");
            }


            CString CUserInfoDataSet::GetPassword()
            {
                
            return GetAsString("Password");
            }
            8、主程序的初始化
            class CWhMgrApp : public CWinApp
            {
            public:
                CDBConnection 
            * m_pConn;
                CWhMgrApp();

            // Overrides
                
            // ClassWizard generated virtual function overrides
                
            //{{AFX_VIRTUAL(CWhMgrApp)
                public:
                
            virtual BOOL InitInstance();
                
            virtual int ExitInstance();
                
            //}}AFX_VIRTUAL

            // Implementation

                
            //{{AFX_MSG(CWhMgrApp)
                    
            // NOTE - the ClassWizard will add and remove member functions here.
                    
            //    DO NOT EDIT what you see in these blocks of generated code !
                
            //}}AFX_MSG
                DECLARE_MESSAGE_MAP()
            }
            ;

            CWhMgrApp::CWhMgrApp()
            {
                
            // TODO: add construction code here,
                
            // Place all significant initialization in InitInstance
            }


            /////////////////////////////////////////////////////////////////////////////
            // The one and only CWhMgrApp object

            CWhMgrApp theApp;

            /////////////////////////////////////////////////////////////////////////////
            // CWhMgrApp initialization

            BOOL CWhMgrApp::InitInstance()
            {
                
            //初始化Com
                ::CoInitialize(NULL);

                
            //初始化數(shù)據(jù)庫連接
                m_pConn = new CDBConnection;

                
            //得到當前程序所在的文件夾
                CString strCommandLine = ::GetCommandLine();
                
            int i;
                
            int nLen = strCommandLine.GetLength();
                
            for(i = nLen - 1; i >= 0; i--)
                
            {
                    CHAR a 
            = strCommandLine.GetAt(i);
                    
            if(a == '\\')
                    
            {
                        
            break;
                    }

                }

                strCommandLine.ReleaseBuffer(i 
            + 1);
                strCommandLine.Delete(
            01);

                
            //打開數(shù)據(jù)庫連接,數(shù)據(jù)庫地址為:當前程序所在文件夾\WhMgrDB.mdb
                if(!m_pConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strCommandLine + "WhMgrDB.mdb;Persist Security Info=False"))
                
            {
                    ::AfxMessageBox(
            "打開數(shù)據(jù)庫失敗!");
                    
            return FALSE;
                }


                
            //用戶登錄
                BOOL bLogined;
                CLoginDlg loginDlg;
                CUserInfoDataSet dsUserInfo;
                dsUserInfo.m_cnn 
            = m_pConn;

                bLogined 
            = FALSE;
                
            //給3次登錄機會
                for(i = 0; i < 3; i++)
                
            {
                    
            if(loginDlg.DoModal() == IDOK)
                    
            {
                        dsUserInfo.LoadData(loginDlg.m_strUserName);
                        
            if(!dsUserInfo.IsEOF())
                        
            {
                            
            if(dsUserInfo.GetPassword() == loginDlg.m_strPassword)
                            
            {
                                bLogined 
            = TRUE;
                                
            break;
                            }

                        }

                        
            else
                        
            {
                            ::AfxMessageBox(
            "用戶名或者密碼不正確,請重試!");
                        }

                        dsUserInfo.Close();
                    }

                    
            else
                    
            {
                        
            break;
                    }

                }


                
            if(!bLogined)
                
            {
                    
            return FALSE;
                }



                AfxEnableControlContainer();

                
            // Standard initialization
                
            // If you are not using these features and wish to reduce the size
                
            //  of your final executable, you should remove from the following
                
            //  the specific initialization routines you do not need.

            #ifdef _AFXDLL
                Enable3dControls();            
            // Call this when using MFC in a shared DLL
            #else
                Enable3dControlsStatic();    
            // Call this when linking to MFC statically
            #endif

                CWhMgrDlg dlg;
                
            //給dlg的m_pConn成員變量賦值
                dlg.m_pConn = m_pConn;
                m_pMainWnd 
            = &dlg;
                
            int nResponse = dlg.DoModal();
                
            if (nResponse == IDOK)
                
            {
                    
            // TODO: Place code here to handle when the dialog is
                    
            //  dismissed with OK
                }

                
            else if (nResponse == IDCANCEL)
                
            {
                    
            // TODO: Place code here to handle when the dialog is
                    
            //  dismissed with Cancel
                }


                
            // Since the dialog has been closed, return FALSE so that we exit the
                
            //  application, rather than start the application's message pump.
                return FALSE;
            }


            int CWhMgrApp::ExitInstance() 
            {
                m_pConn
            ->Close();
                delete m_pConn;
                ::CoUninitialize();
                
            return CWinApp::ExitInstance();
            }

            1 )::CoInitialize(NULL);和::CoUninitialize();:ADO庫是一組COM動態(tài)庫,這意味應用程序在調(diào)用ADO前,必須初始化OLE/COM庫環(huán)境。在MFC應用程序里,一個比較好的方法是在應用程序主類的InitInstance成員函數(shù)里初始化OLE/COM庫環(huán)境。也可用
            if(!AfxOleInit())//這就是初始化COM
            {
            AfxMessageBox(“OLE初始化出錯!”);
            return FALSE;
            }
            2)得到當前程序所在的文件夾:
             CString strCommandLine = ::GetCommandLine();
             int i;
             int nLen = strCommandLine.GetLength();
             for(i = nLen - 1; i >= 0; i--)
             {
              CHAR a = strCommandLine.GetAt(i);
              if(a == '\\')
              {
               break;
              }
             }
             strCommandLine.ReleaseBuffer(i + 1);
             strCommandLine.Delete(0, 1);
            9、歸還的實現(xiàn)

            class COutDialog : public CDialog
            {
            // Construction
            public:
                CDBConnection 
            * m_pConn;
                CString m_strMaterialNum;
                COutDialog(CWnd
            * pParent = NULL);   // standard constructor

            // Dialog Data
                
            //{{AFX_DATA(COutDialog)
                enum { IDD = IDD_OUT_DIALOG };
                CStatic    m_Unit;
                CComboBox    m_MaterialNum;
                BOOL    m_bNeedReturn;
                CString    m_strCount;
                CString    m_strDepartment;
                CString    m_strJsr;
                CString    m_strLqr;
                CString    m_strState;
                CString    m_strUse;
                
            //}}AFX_DATA


            // Overrides
                
            // ClassWizard generated virtual function overrides
                
            //{{AFX_VIRTUAL(COutDialog)
                protected:
                
            virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
                
            //}}AFX_VIRTUAL

            // Implementation
            protected:

                
            // Generated message map functions
                
            //{{AFX_MSG(COutDialog)
                virtual void OnOK();
                afx_msg 
            void OnSelchangeComboMaterialnum();
                
            //}}AFX_MSG
                DECLARE_MESSAGE_MAP()
            }
            ;

            COutDialog::COutDialog(CWnd
            * pParent /*=NULL*/)
                : CDialog(COutDialog::IDD, pParent)
            {
                
            //{{AFX_DATA_INIT(COutDialog)
                m_bNeedReturn = FALSE;
                m_strCount 
            = _T("");
                m_strDepartment 
            = _T("");
                m_strJsr 
            = _T("");
                m_strLqr 
            = _T("");
                m_strState 
            = _T("");
                m_strUse 
            = _T("");
                
            //}}AFX_DATA_INIT
            }



            void COutDialog::DoDataExchange(CDataExchange* pDX)
            {
                CDialog::DoDataExchange(pDX);
                
            //{{AFX_DATA_MAP(COutDialog)
                DDX_Control(pDX, IDC_STATIC_UNIT, m_Unit);
                DDX_Control(pDX, IDC_COMBO_MATERIALNUM, m_MaterialNum);
                DDX_Check(pDX, IDC_CHECK_NEEDRETURN, m_bNeedReturn);
                DDX_Text(pDX, IDC_EDIT_COUNT, m_strCount);
                DDX_Text(pDX, IDC_EDIT_DEPARTMENT, m_strDepartment);
                DDX_Text(pDX, IDC_EDIT_JSR, m_strJsr);
                DDX_Text(pDX, IDC_EDIT_LQR, m_strLqr);
                DDX_Text(pDX, IDC_EDIT_STATE, m_strState);
                DDX_Text(pDX, IDC_EDIT_USE, m_strUse);
                
            //}}AFX_DATA_MAP
                CMaterialInfoDataSet dsMaterialInfo;
                dsMaterialInfo.m_cnn 
            = m_pConn;
                
            if(!dsMaterialInfo.LoadData())
                
            {
                    ::AfxMessageBox(
            "加載物資信息失敗!");
                }

                
            else
                
            {
                    
            while(!dsMaterialInfo.IsEOF())
                    
            {
                        m_MaterialNum.AddString(dsMaterialInfo.GetMaterialNum());
                        dsMaterialInfo.MoveNext();
                    }

                    dsMaterialInfo.Close();
                }

                
            if(m_MaterialNum.GetCount() > 0)
                
            {
                    m_MaterialNum.SetCurSel(
            0);
                    OnSelchangeComboMaterialnum();
                }

            }



            BEGIN_MESSAGE_MAP(COutDialog, CDialog)
                
            //{{AFX_MSG_MAP(COutDialog)
                ON_CBN_SELCHANGE(IDC_COMBO_MATERIALNUM, OnSelchangeComboMaterialnum)
                
            //}}AFX_MSG_MAP
            END_MESSAGE_MAP()

            /////////////////////////////////////////////////////////////////////////////
            // COutDialog message handlers

            void COutDialog::OnOK() 
            {
                
            int nIndex = m_MaterialNum.GetCurSel();
                
            if(nIndex >= 0)
                
            {
                    m_MaterialNum.GetLBText(nIndex, m_strMaterialNum);
                }

                
            else
                
            {
                    m_strMaterialNum 
            = "0";
                }

                CDialog::OnOK();
            }


            void COutDialog::OnSelchangeComboMaterialnum() 
            {
                
            int nIndex = m_MaterialNum.GetCurSel();
                
            if(nIndex >= 0)
                
            {
                    CMaterialInfoDataSet dsMaterialInfo;
                    dsMaterialInfo.m_cnn 
            = m_pConn;
                    CString strNum;
                    m_MaterialNum.GetLBText(nIndex, strNum);
                    dsMaterialInfo.LoadDataByNum(strNum);
                    
            if(!dsMaterialInfo.IsEOF())
                    
            {
                        m_Unit.SetWindowText(dsMaterialInfo.GetUnit());
                    }

                    dsMaterialInfo.Close();
                }
                
            }

            1)給部分程序不僅給出了關(guān)于借出表的實現(xiàn),還參有出庫的實現(xiàn)(關(guān)于出庫的出庫表命令類和出庫表訪問類這邊沒介紹,與借出表的差不多)。如有疑問可以聯(lián)系我。

            這次利用一個工程中的一部分代碼對VC中ADO做了比較詳細的介紹,如有錯誤希望給與指正!!!!!!!!!!

            posted on 2009-06-18 22:58 The_Moment 閱讀(904) 評論(0)  編輯 收藏 引用 所屬分類: VC理論
            久久狠狠高潮亚洲精品| 久久精品国产亚洲av影院| 亚洲?V乱码久久精品蜜桃| 久久久久亚洲AV综合波多野结衣 | 亚洲综合婷婷久久| 99久久久久| 久久香蕉超碰97国产精品 | 色婷婷综合久久久久中文 | 亚洲国产成人久久精品影视| 热久久最新网站获取| 精产国品久久一二三产区区别 | 久久狠狠一本精品综合网| 色综合久久88色综合天天 | 国产精品久久久久影院色| 久久精品国产亚洲5555| 1000部精品久久久久久久久| 色妞色综合久久夜夜| 国产精品久久成人影院| 一本色道久久88精品综合| 久久精品视频一| 亚洲国产精品无码久久久久久曰| 亚洲精品乱码久久久久久按摩| 97久久精品无码一区二区天美| 77777亚洲午夜久久多人| 超级97碰碰碰碰久久久久最新| 久久久久一本毛久久久| 久久99精品国产99久久6| 亚洲色大成网站WWW久久九九| 亚洲国产小视频精品久久久三级 | 国産精品久久久久久久| 久久亚洲精品中文字幕三区| 日韩十八禁一区二区久久| 国产精品伊人久久伊人电影| 午夜天堂av天堂久久久| 99久久99久久精品国产片果冻| 久久久无码精品亚洲日韩蜜臀浪潮| 亚洲精品国产综合久久一线| 国产99久久久国产精品小说| 久久人人青草97香蕉| 国内精品伊人久久久久777| 久久国产欧美日韩精品|