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

📄 xmltype.lfm

📁 Oracle Data Access Components Source Code ODAC v.6.70.0.45
💻 LFM
字号:
object XMLTypeFrame: TXMLTypeFrame
  Height = 287
  Width = 648
  object ToolBar1: TPanel
    Height = 48
    Width = 648
    Align = alTop
    BevelOuter = bvNone
    ClientHeight = 48
    ClientWidth = 648
    TabOrder = 0
    object Panel1: TPanel
      Height = 24
      Width = 560
      BevelOuter = bvNone
      ClientHeight = 24
      ClientWidth = 560
      Color = 170
      ParentColor = False
      TabOrder = 0
      object btOpen: TSpeedButton
        Left = 1
        Height = 22
        Top = 1
        Width = 82
        Caption = 'Open'
        Color = clBtnFace
        Flat = True
        NumGlyphs = 0
        Transparent = False
        OnClick = btOpenClick
      end
      object btClose: TSpeedButton
        Left = 84
        Height = 22
        Top = 1
        Width = 82
        Caption = 'Close'
        Color = clBtnFace
        Flat = True
        NumGlyphs = 0
        Transparent = False
        OnClick = btCloseClick
      end
      object btCreate: TSpeedButton
        Left = 388
        Height = 22
        Hint = 'Create XML objects'
        Top = 1
        Width = 85
        Caption = 'Create'
        Color = clBtnFace
        Flat = True
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        NumGlyphs = 0
        Transparent = False
        OnClick = btCreateClick
      end
      object btDrop: TSpeedButton
        Left = 474
        Height = 22
        Hint = 'Drop XML objects'
        Top = 1
        Width = 85
        Caption = 'Drop'
        Color = clBtnFace
        Flat = True
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        NumGlyphs = 0
        Transparent = False
        OnClick = btDropClick
      end
      object DBNavigator1: TDBNavigator
        Left = 167
        Height = 22
        Top = 1
        Width = 220
        BevelOuter = bvNone
        ClientHeight = 22
        ClientWidth = 220
        Color = clBtnFace
        DataSource = dsData
        Flat = True
        ParentColor = False
        TabOrder = 0
      end
    end
    object Panel3: TPanel
      Height = 23
      Top = 24
      Width = 516
      BevelOuter = bvNone
      ClientHeight = 23
      ClientWidth = 516
      Color = 170
      ParentColor = False
      TabOrder = 1
      object SpeedButton2: TSpeedButton
        Left = 250
        Height = 22
        Width = 82
        Caption = 'Transform'
        Color = clBtnFace
        Flat = True
        NumGlyphs = 0
        Transparent = False
        OnClick = SpeedButton2Click
      end
      object btAddRecord: TSpeedButton
        Left = 1
        Height = 22
        Width = 82
        Caption = 'Add Record'
        Color = clBtnFace
        Flat = True
        NumGlyphs = 0
        Transparent = False
        OnClick = btAddRecordClick
      end
      object btShowCountry: TSpeedButton
        Left = 84
        Height = 22
        Width = 82
        Caption = 'GetSchema'
        Color = clBtnFace
        Flat = True
        NumGlyphs = 0
        Transparent = False
        OnClick = btShowCountryClick
      end
      object SpeedButton1: TSpeedButton
        Left = 167
        Height = 22
        Width = 82
        Caption = 'Extract'
        Color = clBtnFace
        Flat = True
        NumGlyphs = 0
        Transparent = False
        OnClick = SpeedButton1Click
      end
      object Panel2: TPanel
        Left = 333
        Height = 22
        Width = 182
        BevelOuter = bvNone
        ClientHeight = 22
        ClientWidth = 182
        ParentColor = False
        TabOrder = 0
        object Label1: TLabel
          Left = 15
          Height = 14
          Top = 4
          Width = 49
          Caption = 'Based on:'
          ParentColor = False
        end
        object RadioButton1: TRadioButton
          Left = 66
          Height = 19
          Top = 3
          Width = 65
          Caption = 'Schema'
          OnClick = RadioButton1Click
          TabOrder = 0
        end
        object RadioButton2: TRadioButton
          Left = 128
          Height = 19
          Top = 3
          Width = 44
          Caption = 'Lob'
          Checked = True
          OnClick = RadioButton1Click
          State = cbChecked
          TabOrder = 1
        end
      end
    end
  end
  object DBGrid: TDBGrid
    Height = 169
    Top = 48
    Width = 648
    Align = alClient
    DataSource = dsData
    FixedColor = clBtnFace
    FixedHotColor = cl3DLight
    Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    OptionsExtra = [dgeAutoColumns, dgeCheckboxColumn]
    ParentColor = False
    TabOrder = 1
    TabStop = True
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
  end
  object DBMemo1: TDBMemo
    Height = 70
    Top = 217
    Width = 648
    Align = alBottom
    DataField = 'XMLField'
    DataSource = dsData
    Lines.Strings = (
      'DBMemo1'
    )
    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]
    Options.AutoClose = False
    Options.FieldsAsString = False
    Options.DeferredLobRead = False
    Options.ScrollableCursor = False
    Options.FieldsOrigin = False
    Options.DefaultValues = False
    Options.NumberRange = False
    Options.QueryRecCount = False
    Options.AutoPrepare = False
    Options.ReturnParams = False
    Options.FlatBuffers = False
    Options.DetailDelay = 0
    left = 168
    top = 104
  end
  object OraSQL: TOraSQL
    Debug = True
    left = 200
    top = 104
  end
  object scCreate: TOraScript
    SQL.Strings = (
      'declare'
      'doc varchar2(2000) :='
      '''<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>'';'
      'begin'
      '  dbms_xmlschema.registerSchema(''http://www.oracle.com/PO.xsd'', 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(''<PurchaseOrder '
      'xmlns="http://www.oracle.com/PO.xsd" xmlns:xsi="http://www.w3.org/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>'''
      '  )'
      ');'
      ''
      'INSERT INTO xml_type VALUES('
      '  1,'
      '  XMLTYPE(''<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>'''
      '  )'
      ');'
      ''
      'INSERT INTO xml_type VALUES('
      '  2,'
      '  XMLTYPE('
      '    ''<root>value</root>'''
      '  )'
      ');'
      ''
      'COMMIT;'
    )
    left = 224
    top = 56
  end
  object scDrop: TOraScript
    SQL.Strings = (
      'DROP TABLE xml_type;'
      ''
      'DROP TABLE xmlschema_type;'
    )
    left = 256
    top = 56
  end
end

⌨️ 快捷键说明

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