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

📄 main.dfm

📁 MYSQL 连接控件 MYSQL 连接控件
💻 DFM
字号:
object frmMain: TfrmMain
  Left = 390
  Top = 119
  Width = 600
  Height = 635
  HorzScrollBar.Range = 310
  VertScrollBar.Range = 584
  ActiveControl = DBGrid1
  BorderStyle = bsDialog
  Caption = 'Getting started with the MyComponents suite (Embedded version)'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = True
  Position = poScreenCenter
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 8
    Top = 64
    Width = 242
    Height = 13
    Caption = 'Step 1:  Connecting to your MySQL Server'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = 11
    Font.Name = 'MS Sans Serif'
    Font.Pitch = fpVariable
    Font.Style = [fsBold]
    ParentFont = False
  end
  object Label2: TLabel
    Left = 8
    Top = 112
    Width = 197
    Height = 13
    Caption = 'Step 2:  Create a sample database'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = 11
    Font.Name = 'MS Sans Serif'
    Font.Pitch = fpVariable
    Font.Style = [fsBold]
    ParentFont = False
  end
  object Label3: TLabel
    Left = 8
    Top = 160
    Width = 303
    Height = 13
    Caption = 'Step 3:  Populate your database with tables and data'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = 11
    Font.Name = 'MS Sans Serif'
    Font.Pitch = fpVariable
    Font.Style = [fsBold]
    ParentFont = False
  end
  object Version: TLabel
    Left = 152
    Top = 88
    Width = 69
    Height = 13
    Caption = 'Server Version'
  end
  object DBName: TLabel
    Left = 152
    Top = 136
    Width = 46
    Height = 13
    Caption = 'Database'
  end
  object DBNavigator1: TDBNavigator
    Left = 0
    Top = 329
    Width = 592
    Height = 18
    DataSource = DataSource1
    Align = alBottom
    Flat = True
    ParentShowHint = False
    ShowHint = True
    TabOrder = 0
  end
  object DBGrid1: TDBGrid
    Left = 0
    Top = 209
    Width = 592
    Height = 120
    Hint = 
      'This table has two VARCHAR fields, AccountID can'#39't be edited bec' +
      'ause it is an AUTOINC column'
    Align = alBottom
    BorderStyle = bsNone
    DataSource = DataSource1
    ParentShowHint = False
    ShowHint = True
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    Columns = <
      item
        Expanded = False
        FieldName = 'AccountID'
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'AccountName'
        Width = 100
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'AccountAddr'
        Width = 100
        Visible = True
      end>
  end
  object DBNavigator2: TDBNavigator
    Left = 0
    Top = 467
    Width = 592
    Height = 18
    DataSource = DataSource2
    Align = alBottom
    Flat = True
    ParentShowHint = False
    ShowHint = True
    TabOrder = 2
  end
  object DBGrid2: TDBGrid
    Left = 0
    Top = 347
    Width = 592
    Height = 120
    Hint = 
      'OrderID is AUTOINC, AccountID is the column which is master link' +
      'ed to accounts.  As you add records you will see the components ' +
      'autopopulate this field for you with the master table'#39's current ' +
      'value'
    Align = alBottom
    BorderStyle = bsNone
    DataSource = DataSource2
    ParentShowHint = False
    ShowHint = True
    TabOrder = 3
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    Columns = <
      item
        Expanded = False
        FieldName = 'OrderID'
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'AccountID'
        ReadOnly = True
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'ProductID'
        Visible = True
      end>
  end
  object Button1: TButton
    Left = 8
    Top = 80
    Width = 137
    Height = 25
    Caption = 'Connect'
    TabOrder = 4
    OnClick = Button1Click
  end
  object Button2: TButton
    Left = 8
    Top = 128
    Width = 137
    Height = 25
    Caption = 'Create DB'
    TabOrder = 7
    OnClick = Button2Click
  end
  object Button3: TButton
    Left = 8
    Top = 176
    Width = 137
    Height = 25
    Caption = 'Create Tables && Data'
    TabOrder = 5
    OnClick = Button3Click
  end
  object GroupBox1: TGroupBox
    Left = 0
    Top = 485
    Width = 592
    Height = 105
    Hint = 
      'This table contains, MEMO and BLOB (Image) fields as well as a F' +
      'LOAT.  It is linked to the orders grid'
    Align = alBottom
    Caption = 'Product Info'
    ParentShowHint = False
    ShowHint = True
    TabOrder = 6
    DesignSize = (
      592
      105)
    object DBText2: TDBText
      Left = 64
      Top = 32
      Width = 65
      Height = 17
      DataField = 'ProductAmount'
      DataSource = DataSource3
    end
    object DBText1: TDBText
      Left = 64
      Top = 16
      Width = 101
      Height = 17
      DataField = 'ProductName'
      DataSource = DataSource3
    end
    object Name: TLabel
      Left = 8
      Top = 16
      Width = 28
      Height = 13
      Caption = 'Name'
    end
    object Label4: TLabel
      Left = 8
      Top = 32
      Width = 36
      Height = 13
      Caption = 'Amount'
    end
    object DBImage1: TDBImage
      Left = 8
      Top = 48
      Width = 65
      Height = 49
      DataField = 'ProductImage'
      DataSource = DataSource3
      TabOrder = 0
    end
    object DBMemo1: TDBMemo
      Left = 224
      Top = 16
      Width = 354
      Height = 81
      Anchors = [akLeft, akTop, akRight]
      DataField = 'ProductText'
      DataSource = DataSource3
      TabOrder = 1
    end
  end
  object DBNavigator3: TDBNavigator
    Left = 0
    Top = 590
    Width = 592
    Height = 18
    DataSource = DataSource3
    VisibleButtons = [nbEdit, nbPost, nbCancel, nbRefresh]
    Align = alBottom
    Flat = True
    ParentShowHint = False
    ShowHint = True
    TabOrder = 8
  end
  object Memo1: TMemo
    Left = 0
    Top = 0
    Width = 592
    Height = 57
    Align = alTop
    BorderStyle = bsNone
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    Lines.Strings = (
      
        'Before you start, take note of the MySQLServer1.Params property ' +
        'and the directory structure in this demo.  Also note, you will '
      
        'need the MySQL embedded library libmysqld.dll (windows) or libmy' +
        'sqld.so (linux) to run this demo, see your MyComponents '
      
        'helpfile for more info on using the Embedded server. Ready? just' +
        ' run and follow the steps and instructions, it really is as easy' +
        ' '
      'as 1, 2 ,3!')
    ParentFont = False
    TabOrder = 9
  end
  object MySQLServer1: TMySQLServer
    DriverKind = dtEmbedded
    DriverProperties.ClientDLL = 'libmysqld.dll'
    DriverProperties.Options.Strings = (
      'basedir=.'
      'datadir=.'
      'character-sets-dir=./charsets'
      'language=.')
    Host = 'localhost'
    Port = 0
    LoginPrompt = True
    UserName = 'root'
    Params.Strings = (
      '[embedded]'
      'basedir=.'
      'datadir=.'
      'character-sets-dir=./charsets'
      'language=.')
    Left = 280
    Top = 72
  end
  object OpenDialog1: TOpenDialog
    DefaultExt = 'sql'
    FileName = 'sampledb.sql'
    Filter = '*.sql'
    FilterIndex = 0
    Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
    Title = 'Open SQL Script'
    Left = 280
    Top = 160
  end
  object DataSource1: TDataSource
    DataSet = MySQLTable1
    Left = 280
    Top = 208
  end
  object DataSource2: TDataSource
    DataSet = MySQLTable2
    Left = 280
    Top = 352
  end
  object MySQLTable1: TMySQLTable
    Server = MySQLServer1
    TableName = 'accounts'
    OnExecSQL = MySQLTable1ExecSQL
    Left = 320
    Top = 208
  end
  object MySQLTable2: TMySQLTable
    Server = MySQLServer1
    MasterFields = 'AccountID=AccountID'
    MasterSource = DataSource1
    TableName = 'orders'
    OnExecSQL = MySQLTable1ExecSQL
    Left = 320
    Top = 352
  end
  object DataSource3: TDataSource
    DataSet = MySQLTable3
    Left = 280
    Top = 490
  end
  object MySQLTable3: TMySQLTable
    Server = MySQLServer1
    MasterFields = 'ProductID=ProductID'
    MasterSource = DataSource2
    TableName = 'products'
    OnExecSQL = MySQLTable1ExecSQL
    Left = 320
    Top = 490
  end
end

⌨️ 快捷键说明

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