MainFrm.h
资源名称:ISQL_src.zip [点击查看]
上传用户:jsxglz
上传日期:2007-01-03
资源大小:117k
文件大小:5k
源码类别:
SQL Server
开发平台:
Visual C++
- // MainFrm.h : interface of the CMainFrame class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MAINFRM_H__96F0E249_A409_11D1_B9D3_204C4F4F5020__INCLUDED_)
- #define AFX_MAINFRM_H__96F0E249_A409_11D1_B9D3_204C4F4F5020__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include "SQLView.h"
- #include "ResultView.h"
- #include "ISQLToolBar.h"
- class CMainFrame;
- struct ThreadParam
- {
- CStringEx m_strSQL;
- CResultView* m_pView;
- CMainFrame* m_pFrame;
- };
- class CMainFrame : public CFrameWnd
- {
- protected: // create from serialization only
- CMainFrame();
- DECLARE_DYNCREATE(CMainFrame)
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMainFrame)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- protected:
- virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- BOOL IsTextDataSource();
- CString m_strServerName;
- void InitialShowWindow(UINT nCmdShow);
- CSQLView* GetSQLView();
- virtual ~CMainFrame();
- CStatusBar m_wndStatusBar;
- int m_nResultSetPaneNo;
- CString m_strDBMS;
- CString m_strMSSQLServer;
- CString m_strSQLAnyWhere;
- CString m_strSybaseOpenServer;
- CString m_strOracle;
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected: // control bar embedded members
- CISQLToolBar m_wndToolBar;
- // Generated message map functions
- public:
- int m_nLoginTimeOut;
- int m_nThreadPriority;
- int m_nQueryTimeOut;
- BOOL m_bCanceled;
- BOOL m_bExecuting;
- CString m_strDBName;
- CComboBox m_comboBox;
- CRecordsetEx* m_pSet;
- BOOL m_bIsMultiSetSupported;
- BOOL m_bIsTSQLSupported;
- BOOL IsMultiResultSetsSupported();
- BOOL m_bIsJetDriver;
- BOOL IsODBCJetDriver();
- CString m_strODBCDSN;
- CPtrList m_GridList;
- CString m_strStatusText;
- void OnExceptionClear(const CString& sMsg);
- void SetResultSetInfo();
- CResultView* GetResultView();
- BOOL ExecuteSQLEx(const CStringEx& sSQL);
- CDatabase m_database;
- CSplitterWnd m_wndSplitter;
- //{{AFX_MSG(CMainFrame)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnSqlLogon();
- afx_msg void OnSqlExecute();
- afx_msg void OnUpdateSqlExecute(CCmdUI* pCmdUI);
- afx_msg void OnSqlLogoff();
- afx_msg void OnUpdateSqlLogoff(CCmdUI* pCmdUI);
- afx_msg void OnUpdateSqlLogon(CCmdUI* pCmdUI);
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnSqlSelectTables();
- afx_msg void OnUpdateSqlSelectTables(CCmdUI* pCmdUI);
- afx_msg void OnSelChangeDatabase();
- afx_msg void OnSqlSelectProcedures();
- afx_msg void OnUpdateSqlSelectProcedures(CCmdUI* pCmdUI);
- afx_msg void OnSqlObjects();
- afx_msg void OnViewPrevResultSet();
- afx_msg void OnUpdateViewPrevResultSet(CCmdUI* pCmdUI);
- afx_msg void OnViewNextResultSet();
- afx_msg void OnUpdateViewNextResultSet(CCmdUI* pCmdUI);
- afx_msg void OnViewFirstResultSet();
- afx_msg void OnUpdateViewFirstResultSet(CCmdUI* pCmdUI);
- afx_msg void OnViewLastResultSet();
- afx_msg void OnUpdateViewLastResultSet(CCmdUI* pCmdUI);
- afx_msg void OnUpdateSqlObjects(CCmdUI* pCmdUI);
- afx_msg void OnHelpOdbcInfo();
- afx_msg void OnUpdateHelpOdbcInfo(CCmdUI* pCmdUI);
- afx_msg void OnSqlCancel();
- afx_msg void OnUpdateSqlCancel(CCmdUI* pCmdUI);
- afx_msg void OnServerConfigure();
- afx_msg void OnQueryOptions();
- afx_msg void OnUpdateCombo(CCmdUI* pCmdUI);
- afx_msg void OnQueryNew();
- afx_msg void OnUpdateQueryNew(CCmdUI* pCmdUI);
- afx_msg void OnClose();
- //}}AFX_MSG
- afx_msg void OnUpdateIndicatorResultSetInfo(CCmdUI* pCmdUI);
- afx_msg LONG OnExecutionComplete(UINT wParam, LONG lParam);
- DECLARE_MESSAGE_MAP()
- private:
- void ConnectDataSource();
- BOOL CloneProcess(const bool& bNewQuery = true);
- bool m_bNewConnection;
- void SetExecutionTime();
- DWORD m_dwStart;
- int m_nExecutionTimePaneNo;
- CString m_strExecutionTime;
- BOOL m_bSQLCancelSupported;
- BOOL IsSQLCancelSupported();
- int GetThreadPriority(const CString& sPriority);
- CString GetQueryDef(const CString& sDBName, const CString& sSQL);
- int m_nServerPaneNo;
- void HideResultSets();
- void DisplayResults(CMSFlexGrid* pGridCtrl, const int& nCurrentSet);
- CString GetRowCount(const CString& sSQL);
- UINT m_nID;
- BOOL IsObjectExists(const CString& sObjName);
- void DisplayProcedureText(const CString& sText);
- CString GetProcedureText(CString& sSQL, const CString& sObjName);
- BOOL SelectDatabase();
- BOOL FillCombo();
- CFont m_font;
- int m_nIndex;
- CMSFlexGrid* GetGrid();
- void SetGridHeaderInfo(CMSFlexGrid* pGrid, CRecordsetEx* pSet);
- void ClearGridList();
- bool m_bOKToSize;
- ThreadParam m_ThreadParam;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MAINFRM_H__96F0E249_A409_11D1_B9D3_204C4F4F5020__INCLUDED_)