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

📄 fconn.class

📁 Gambas is a graphical development environment based on a Basic interpreter, like Visual Basic. It us
💻 CLASS
字号:
' Gambas class file' This examples will demonstrate how to create report using HTML and gb WebBrowser show it  '' Written by Rizky Tahara Shita (rizky@bti.bl.ac.id) for Gambas                             '' What's new?' (21-Jul-2004)' 1. Fixed some syntax for gambas 0.95' 2. Rebuild the project, cause if you have a project older that 0.94 (if i'm not mistake) and '    you open it in the future version, you got to rebuild it.. i don't know why... :(' (23-Feb-2004)' 1. Implementing Index properties like VB by using Group dan Tag properties in Gambas' 2. Previewing the Report now can resize the objects inside it when the Form resize' (< 23-Feb-2004 -- i forgot the specific date --)' 1. Database and tables will automaticly created if there aren't exist yet in the server :)PUBLIC SUB Form_Open()  ME.centerENDPUBLIC SUB ginput_KeyPress()  IF Key.code=Key.enter OR Key.code=Key.return THEN    SELECT CASE LAST.tag      CASE 1        textbox2.setfocus              CASE 2        textbox3.setfocus            CASE 3        button1.setfocus    END SELECT  END IFENDPUBLIC SUB gbtn_Click()DIM dbname AS StringDIM tbname AS StringDIM htable AS Table  SELECT CASE LAST.tag    CASE 1  'connect button      dbname="gbstest"      tbname="user"      WITH Mglobal        .btnok="&Yes"        .btnno="&No"        'check if the logins corrects or not        IF .conn(textbox1.text, textbox2.text, textbox3.text)=TRUE THEN          'create the database and tables if not exist yet          IF NOT .db.Databases.Exist(dbname) THEN             .db.Databases.Add(dbname)            .db.Close            .db.Name=dbname            .db.Open            'create the tables if it isn't exist yet            IF NOT .db.Tables.Exist(tbname) THEN              htable=.db.Tables.Add(tbname)              htable.Fields.Add("id", gb.String, 10)              htable.Fields.Add("name", gb.String, 40)              htable.PrimaryKey=["id"]              htable.Update            END IF          ELSE            'use the database            .db.Close            .db.Name=dbname            .db.Open          END IF          ME.close          Fmain.show        END IF      END WITH        CASE 2  'cancel button      ME.close  END SELECTCATCH  Message.Error(Error.Text)END

⌨️ 快捷键说明

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