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

📄 xmltype.dfm

📁 Oracle Data Access Components Source Code ODAC v.6.70.0.45
💻 DFM
字号:
inherited XMLTypeFrame: TXMLTypeFrame
  object ToolBar1: TPanel
    Left = 0
    Top = 0
    Width = 443
    Height = 48
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 0
    object Panel1: TPanel
      Left = 0
      Top = 0
      Width = 560
      Height = 24
      BevelOuter = bvNone
      Color = 170
      TabOrder = 0
      object btOpen: TSpeedButton
        Left = 1
        Top = 1
        Width = 82
        Height = 22
        Caption = 'Open'
        Flat = True
        Transparent = False
        OnClick = btOpenClick
      end
      object btClose: TSpeedButton
        Left = 84
        Top = 1
        Width = 82
        Height = 22
        Caption = 'Close'
        Flat = True
        Transparent = False
        OnClick = btCloseClick
      end
      object btCreate: TSpeedButton
        Left = 388
        Top = 1
        Width = 85
        Height = 22
        Hint = 'Create XML objects'
        Caption = 'Create'
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        Transparent = False
        OnClick = btCreateClick
      end
      object btDrop: TSpeedButton
        Left = 474
        Top = 1
        Width = 85
        Height = 22
        Hint = 'Drop XML objects'
        Caption = 'Drop'
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        Transparent = False
        OnClick = btDropClick
      end
      object DBNavigator1: TDBNavigator
        Left = 167
        Top = 1
        Width = 220
        Height = 22
        DataSource = dsData
        Flat = True
        TabOrder = 0
      end
    end
    object Panel3: TPanel
      Left = 0
      Top = 24
      Width = 516
      Height = 23
      BevelOuter = bvNone
      Color = 170
      TabOrder = 1
      object SpeedButton2: TSpeedButton
        Left = 250
        Top = 0
        Width = 82
        Height = 22
        Caption = 'Transform'
        Flat = True
        Transparent = False
        OnClick = SpeedButton2Click
      end
      object btAddRecord: TSpeedButton
        Left = 1
        Top = 0
        Width = 82
        Height = 22
        Caption = 'Add Record'
        Flat = True
        Transparent = False
        OnClick = btAddRecordClick
      end
      object btShowCountry: TSpeedButton
        Left = 84
        Top = 0
        Width = 82
        Height = 22
        Caption = 'GetSchema'
        Flat = True
        Transparent = False
        OnClick = btShowCountryClick
      end
      object SpeedButton1: TSpeedButton
        Left = 167
        Top = 0
        Width = 82
        Height = 22
        Caption = 'Extract'
        Flat = True
        Transparent = False
        OnClick = SpeedButton1Click
      end
      object Panel2: TPanel
        Left = 333
        Top = 0
        Width = 182
        Height = 22
        BevelOuter = bvNone
        TabOrder = 0
        object Label1: TLabel
          Left = 15
          Top = 4
          Width = 48
          Height = 13
          Caption = 'Based on:'
        end
        object RadioButton1: TRadioButton
          Left = 66
          Top = 3
          Width = 61
          Height = 17
          Caption = 'Schema'
          TabOrder = 0
          OnClick = RadioButton1Click
        end
        object RadioButton2: TRadioButton
          Left = 128
          Top = 3
          Width = 52
          Height = 17
          Caption = 'Lob'
          Checked = True
          TabOrder = 1
          TabStop = True
          OnClick = RadioButton1Click
        end
      end
    end
  end
  object DBGrid: TDBGrid
    Left = 0
    Top = 48
    Width = 443
    Height = 159
    Align = alClient
    DataSource = dsData
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
  end
  object DBMemo1: TDBMemo
    Left = 0
    Top = 207
    Width = 443
    Height = 70
    Align = alBottom
    DataField = 'XMLField'
    DataSource = dsData
    TabOrder = 2
  end
  object dsData: TDataSource
    DataSet = Query
    Left = 24
    Top = 80
  end
  object Query: TSmartQuery
    SQL.Strings = (
      '')
    Debug = True
    FetchRows = 20
    LockMode = lmNone
    RefreshOptions = [roAfterInsert, roAfterUpdate]
    ObjectView = True
    Left = 168
    Top = 104
  end
  object OraSQL: TOraSQL
    Debug = True
    Left = 200
    Top = 104
  end
  object scCreate: TOraScript
    SQL.Strings = (
      'declare'
      'doc varchar2(2000) :='
      #39'<schema targetNamespace="http://www.oracle.com/PO.xsd"'
      '  xmlns:po="http://www.oracle.com/PO.xsd"'
      '  xmlns="http://www.w3.org/2001/XMLSchema">'
      '  <complexType name="PurchaseOrderType">'
      '    <sequence>'
      '      <element name="PONum" type="decimal"/>'
      ''
      '      <element name="Company">'
      '        <simpleType>'
      '          <restriction base="string">'
      '            <maxLength value="100"/>'
      '          </restriction>'
      '        </simpleType>'
      '      </element>'
      ''
      '      <element name="Item" maxOccurs="1000">'
      '        <complexType>'
      '          <sequence>'
      '            <element name="Part">'
      '              <simpleType>'
      '                <restriction base="string">'
      '                  <maxLength value="1000"/>'
      '                </restriction>'
      '              </simpleType>'
      '            </element>'
      ''
      '            <element name="Price" type="float"/>'
      ''
      '          </sequence>'
      '        </complexType>'
      '      </element>'
      ''
      '    </sequence>'
      '  </complexType>'
      '  <element name="PurchaseOrder" type="po:PurchaseOrderType"/>'
      '</schema>'#39';'
      'begin'
      
        '  dbms_xmlschema.registerSchema('#39'http://www.oracle.com/PO.xsd'#39', ' +
        'doc);'
      'end;'
      '/'
      ''
      'CREATE TABLE xmlschema_type ('
      '  ID NUMBER PRIMARY KEY,'
      '  XMLField SYS.XMLType'
      ')'
      'XMLTYPE COLUMN XMLField'
      '  XMLSCHEMA "http://www.oracle.com/PO.xsd"'
      '  ELEMENT "PurchaseOrder";'
      ''
      'CREATE TABLE xml_type ('
      '  ID NUMBER PRIMARY KEY,'
      '  XMLField XMLTYPE'
      ');'
      ''
      'INSERT INTO xmlschema_type VALUES('
      '  1,'
      '  XMLTYPE('#39'<PurchaseOrder '
      
        'xmlns="http://www.oracle.com/PO.xsd" xmlns:xsi="http://www.w3.or' +
        'g/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle' +
        '.com/PO.xsd http://www.oracle.com/PO.xsd">'
      '  <PONum>73</PONum>'
      '  <Company>Oracle Corp</Company>'
      '  <Item>'
      '    <Part>9i Doc Set</Part>'
      '    <Price>130</Price>'
      '  </Item>'
      '  <Item>'
      '    <Part>8i Doc Set</Part>'
      '    <Price>946</Price>'
      '  </Item>'
      '</PurchaseOrder>'#39
      '  )'
      ');'
      ''
      'INSERT INTO xml_type VALUES('
      '  1,'
      '  XMLTYPE('#39'<PurchaseOrder>'
      '  <PONum>73</PONum>'
      '  <Company>Oracle Corp</Company>'
      '  <Item>'
      '    <Part>9i Doc Set</Part>'
      '    <Price>130</Price>'
      '  </Item>'
      '  <Item>'
      '    <Part>8i Doc Set</Part>'
      '    <Price>946</Price>'
      '  </Item>'
      '</PurchaseOrder>'#39
      '  )'
      ');'
      ''
      'INSERT INTO xml_type VALUES('
      '  2,'
      '  XMLTYPE('
      '    '#39'<root>value</root>'#39
      '  )'
      ');'
      ''
      'COMMIT;')
    Session = ODACForm.OraSession
    Left = 224
    Top = 56
  end
  object scDrop: TOraScript
    SQL.Strings = (
      'DROP TABLE xml_type;'
      ''
      'DROP TABLE xmlschema_type;')
    Session = ODACForm.OraSession
    Left = 256
    Top = 56
  end
end

⌨️ 快捷键说明

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