Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - // fivewin odbc management !!! http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 // FiveWin ODBC management !!!

 // ODBC = Open DataBase Connectivity

 #include "FiveWin.ch"

 static oWnd

 //----------------------------------------------------------------------------//

 function Main()

    local oBrush

    // SET 3DLOOK ON

    DEFINE BRUSH oBrush FILE "..\bitmaps\odbcdem.bmp"

    DEFINE WINDOW oWnd FROM 1, 1 TO 20, 75 TITLE "Testing ODBC" ;
       MENU BuildMenu() BRUSH oBrush

    @ 2, 2 BITMAP FILE "..\bitmaps\ODBC.bmp" OF oWnd
  
    @ 12, 2 BITMAP FILE "..\bitmaps\ODBC2.bmp" OF oWnd

    ACTIVATE WINDOW oWnd

 return nil

 //----------------------------------------------------------------------------//

 function BuildMenu()

    local oMenu

    MENU oMenu
       MENUITEM "Use &ODBC" ACTION TestOdbc()
    ENDMENU

 return oMenu

 //----------------------------------------------------------------------------//

 function TestOdbc()

    local oDbc, oDlg
    local oName, cName

    DEFINE ODBC oDbc CONNECT "DSN=Dialog" FROM USER

    cName = oDbc:FieldGet( 1 )

    DEFINE DIALOG oDlg FROM 2, 2 TO 14, 60 TITLE "ODBC Management"

    @ 2, 2 SAY oDbc:FieldName( 1 ) OF oDlg
    @ 2, 6 GET oName VAR cName OF oDlg COLOR "W+/RB"

    @ 5, 10 BUTTON "&Next" OF oDlg ;
       ACTION ( oDbc:Skip(),;
                cName := oDbc:FieldGet( 1 ),;
                oName:Refresh() )

    ACTIVATE DIALOG oDlg

    oDbc:End()

 return nil

 //----------------------------------------------------------------------------//

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson