⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apb.htm

📁 Learn SQL in an easy way...
💻 HTM
📖 第 1 页 / 共 2 页
字号:
CTyssqlSet::CTyssqlSet(CDatabase* pdb)    : CRecordset(pdb){    //{{AFX_FIELD_INIT(CTyssqlSet)    m_NAME = &quot;&quot;;    m_ADDRESS = &quot;&quot;;    m_STATE = &quot;&quot;;    m_ZIP = &quot;&quot;;    m_PHONE = &quot;&quot;;    m_REMARKS = &quot;&quot;;    m_nFields = 6;    //}}AFX_FIELD_INIT}CString CTyssqlSet::GetDefaultConnect(){    return &quot;ODBC;DSN=TYSSQL;&quot;;}CString CTyssqlSet::GetDefaultSQL(){    return &quot;SELECT * FROM CUSTOMER ORDER BY NAME&quot;;}void CTyssqlSet::DoFieldExchange(CFieldExchange* pFX){    //{{AFX_FIELD_MAP(CTyssqlSet)    pFX-&gt;SetFieldType(CFieldExchange::outputColumn);    RFX_Text(pFX, &quot;NAME&quot;, m_NAME);    RFX_Text(pFX, &quot;ADDRESS&quot;, m_ADDRESS);    RFX_Text(pFX, &quot;STATE&quot;, m_STATE);    RFX_Text(pFX, &quot;ZIP&quot;, m_ZIP);    RFX_Text(pFX, &quot;PHONE&quot;, m_PHONE);    RFX_Text(pFX, &quot;REMARKS&quot;, m_REMARKS);    //}}AFX_FIELD_MAP}// tyssql.cpp : Defines the class behaviors for the application.//#include &quot;stdafx.h&quot;#include &quot;tyssql.h&quot;#include &quot;mainfrm.h&quot;#include &quot;tyssqset.h&quot;#include &quot;tyssqdoc.h&quot;#include &quot;tyssqvw.h&quot;#ifdef _DEBUG#undef THIS_FILEstatic char BASED_CODE THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CTyssqlAppBEGIN_MESSAGE_MAP(CTyssqlApp, CWinApp)    //{{AFX_MSG_MAP(CTyssqlApp)    ON_COMMAND(ID_APP_ABOUT, OnAppAbout)        // NOTE - the ClassWizard will add and remove mapping macros here.        //    DO NOT EDIT what you see in these blocks of generated code!    //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CTyssqlApp constructionCTyssqlApp::CTyssqlApp(){    // TODO: add construction code here,    // Place all significant initialization in InitInstance}/////////////////////////////////////////////////////////////////////////////// The one and only CTyssqlApp objectCTyssqlApp NEAR theApp;/////////////////////////////////////////////////////////////////////////////// CTyssqlApp initializationBOOL CTyssqlApp::InitInstance(){    // 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.    SetDialogBkColor();        // Set dialog background color to gray    LoadStdProfileSettings();  // Load standard INI file options (including MRU)    // Register the application's document templates.  Document templates    //  serve as the connection between documents, frame windows and views.    CSingleDocTemplate* pDocTemplate;    pDocTemplate = new CSingleDocTemplate(        IDR_MAINFRAME,        RUNTIME_CLASS(CTyssqlDoc),        RUNTIME_CLASS(CMainFrame),     // main SDI frame window        RUNTIME_CLASS(CTyssqlView));    AddDocTemplate(pDocTemplate);    // create a new (empty) document    OnFileNew();    if (m_lpCmdLine[0] != '\0')    {        // TODO: add command line processing here    }    return TRUE;}/////////////////////////////////////////////////////////////////////////////// CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialog{public:    CAboutDlg();// Dialog Data    //{{AFX_DATA(CAboutDlg)    enum { IDD = IDD_ABOUTBOX };    //}}AFX_DATA// Implementationprotected:    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support    //{{AFX_MSG(CAboutDlg)        // No message handlers    //}}AFX_MSG    DECLARE_MESSAGE_MAP()};CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD){    //{{AFX_DATA_INIT(CAboutDlg)    //}}AFX_DATA_INIT}void CAboutDlg::DoDataExchange(CDataExchange* pDX){    CDialog::DoDataExchange(pDX);    //{{AFX_DATA_MAP(CAboutDlg)    //}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)    //{{AFX_MSG_MAP(CAboutDlg)        // No message handlers    //}}AFX_MSG_MAPEND_MESSAGE_MAP()// App command to run the dialogvoid CTyssqlApp::OnAppAbout(){    CAboutDlg aboutDlg;    aboutDlg.DoModal();}/////////////////////////////////////////////////////////////////////////////// CTyssqlApp commands// tyssqdoc.cpp : implementation of the CTyssqlDoc class//#include &quot;stdafx.h&quot;#include &quot;tyssql.h&quot;#include &quot;tyssqset.h&quot;#include &quot;tyssqdoc.h&quot;#ifdef _DEBUG#undef THIS_FILEstatic char BASED_CODE THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CTyssqlDocIMPLEMENT_DYNCREATE(CTyssqlDoc, CDocument)BEGIN_MESSAGE_MAP(CTyssqlDoc, CDocument)    //{{AFX_MSG_MAP(CTyssqlDoc)        // NOTE - the ClassWizard will add and remove mapping macros here.        //    DO NOT EDIT what you see in these blocks of generated code!    //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CTyssqlDoc construction/destructionCTyssqlDoc::CTyssqlDoc(){    // TODO: add one-time construction code here}CTyssqlDoc::~CTyssqlDoc(){}BOOL CTyssqlDoc::OnNewDocument(){    if (!CDocument::OnNewDocument())        return FALSE;    // TODO: add reinitialization code here    // (SDI documents will reuse this document)    return TRUE;}/////////////////////////////////////////////////////////////////////////////// CTyssqlDoc diagnostics#ifdef _DEBUGvoid CTyssqlDoc::AssertValid() const{    CDocument::AssertValid();}void CTyssqlDoc::Dump(CDumpContext&amp; dc) const{    CDocument::Dump(dc);}#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////// CTyssqlDoc commands// stdafx.cpp : source file that includes just the standard includes//  stdafx.pch will be the pre-compiled header//  stdafx.obj will contain the pre-compiled type information#include &quot;stdafx.h&quot;// mainfrm.cpp : implementation of the CMainFrame class//#include &quot;stdafx.h&quot;#include &quot;tyssql.h&quot;#include &quot;mainfrm.h&quot;#ifdef _DEBUG#undef THIS_FILEstatic char BASED_CODE THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CMainFrameIMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)    //{{AFX_MSG_MAP(CMainFrame)        // NOTE - the ClassWizard will add and remove mapping macros here.        //    DO NOT EDIT what you see in these blocks of generated code !    ON_WM_CREATE()    //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// arrays of IDs used to initialize control bars// toolbar buttons - IDs are command buttonsstatic UINT BASED_CODE buttons[] ={    // same order as in the bitmap 'toolbar.bmp'    ID_EDIT_CUT,    ID_EDIT_COPY,    ID_EDIT_PASTE,        ID_SEPARATOR,    ID_FILE_PRINT,        ID_SEPARATOR,    ID_RECORD_FIRST,    ID_RECORD_PREV,    ID_RECORD_NEXT,    ID_RECORD_LAST,        ID_SEPARATOR,    ID_APP_ABOUT,};static UINT BASED_CODE indicators[] ={    ID_SEPARATOR,           // status line indicator    ID_INDICATOR_CAPS,    ID_INDICATOR_NUM,    ID_INDICATOR_SCRL,};/////////////////////////////////////////////////////////////////////////////// CMainFrame construction/destructionCMainFrame::CMainFrame(){    // TODO: add member initialization code here}CMainFrame::~CMainFrame(){}int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct){    if (CFrameWnd::OnCreate(lpCreateStruct) == -1)        return -1;    if (!m_wndToolBar.Create(this) ||        !m_wndToolBar.LoadBitmap(IDR_MAINFRAME) ||        !m_wndToolBar.SetButtons(buttons,          sizeof(buttons)/sizeof(UINT)))    {        TRACE(&quot;Failed to create toolbar\n&quot;);        return -1;      // fail to create    }    if (!m_wndStatusBar.Create(this) ||        !m_wndStatusBar.SetIndicators(indicators,          sizeof(indicators)/sizeof(UINT)))    {        TRACE(&quot;Failed to create status bar\n&quot;);        return -1;      // fail to create    }    return 0;}/////////////////////////////////////////////////////////////////////////////// CMainFrame diagnostics#ifdef _DEBUGvoid CMainFrame::AssertValid() const{    CFrameWnd::AssertValid();}void CMainFrame::Dump(CDumpContext&amp; dc) const{    CFrameWnd::Dump(dc);}#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////// CMainFrame message handlers</FONT></PRE><P><CENTER><P><HR><A HREF="../apa/apa.htm"><IMG SRC="../buttonart/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../apc/apc.htm"><IMGSRC="../buttonart/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../buttonart/contents.gif" WIDTH="128"HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> <BR><BR><BR><IMG SRC="../buttonart/corp.gif" WIDTH="284" HEIGHT="45" ALIGN="BOTTOM" ALT="Macmillan Computer Publishing USA"BORDER="0"></P><P>&#169; <A HREF="../copy.htm">Copyright</A>, Macmillan Computer Publishing. Allrights reserved.</CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -