亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wrap.dpr

?? 用于oracle開發用于查詢數據庫編寫存儲過
?? DPR
字號:
// PL/SQL Developer Plug-In demo
// Copyright 1999 Allround Automations
// support@allroundautomations.nl
// http://www.allroundautomations.nl

// This demo shows the use of some basic functions in a practical plug-In that
// implements a wrap function.
// The selected object in the Browser will be saved as a text file and "wrapped"

library Wrap;

uses
  Windows, Dialogs, SysUtils, Classes, Registry;

// Declaration of some PL/SQL Developer callback functions
var
  // We want to save and restore the directory in the registry
  SYS_Registry: function: PChar; cdecl;
  // We need to search the wrap executable in ORACLE_HOME\bin
  SYS_OracleHome: function: PChar; cdecl;

  // The menu item will only be enabled if a program unit is selected in the Browser
  IDE_MenuState: procedure(ID, Index: Integer; Enabled: Bool); cdecl;
  // The currently selected object in the Browser is the one that will be wrapped
  IDE_GetBrowserInfo: procedure(var ObjectType, ObjectOwner, ObjectName: PChar); cdecl;

  // To retrieve the source from the database, we need to query sys.all_source
  SQL_Execute: function(SQL: PChar): Integer; cdecl;
  SQL_Eof: function: Bool; cdecl;
  SQL_Next: function: Integer; cdecl;
  SQL_Field: function(Field: Integer): PChar; cdecl;

var
  PlugInID: Integer;
  WrapExe: string = '';

const // Description of this Plug-In (as displayed in Plug-In configuration dialog)
  Desc = 'Wrap demo version 1.0';

// Determine the name for a temporary file
function TempFilename: string;
var Path: array[0..144] of char;
begin
  GetTempPath(SizeOf(Path), Path);
  Result := Path + 'wrap.tmp';
end;

// Determine the Wrap executable. If more than one is present, use the most
// recent one
procedure GetWrapExe;
var Path: string;
    SearchRec: TSearchRec;
    TimeStamp: Integer;
    Error: Integer;
begin
  Path := SYS_OracleHome + 'bin\';
  Error := FindFirst(Path + 'wrap*.exe', faArchive, SearchRec);
  TimeStamp := 0;
  while Error = 0 do
  begin
    if SearchRec.Time > TimeStamp then
    begin
      WrapExe := Path + SearchRec.Name;
      TimeStamp := SearchRec.Time;
    end;
    Error := FindNext(SearchRec);
  end;
  FindClose(SearchRec);
end;

// Save the currently selected program unit to a temporary file
function SaveProgramUnit: Boolean;
var ObjectType, ObjectOwner, ObjectName: PChar;
    Error: Integer;
    SQL: string;
    Source: TStringList;
    Line: string;
begin
  // Determine what object is selected in the Browser
  IDE_GetBrowserInfo(ObjectType, ObjectOwner, ObjectName);
  // Build a select statement to retrieve the source
  SQL := Format('select text from sys.all_source' +
                ' where type = ''%s'' and owner = ''%s'' and name = ''%s''' +
                ' order by line', [ObjectType, ObjectOwner, ObjectName]);
  // Execute the select statement and retrieve all source lines
  Source := TStringList.Create;
  Error := SQL_Execute(PChar(SQL));
  while (Error = 0) and not SQL_Eof do
  begin
    Line := TrimRight(SQL_Field(0));
    // Add the 'create or replace' syntax on the first line
    if Source.Count = 0 then Line := 'create or replace ' + Line;
    Source.Add(Line);
    Error := SQL_Next;
  end;
  Result := (Error = 0);
  if not Result then
    ShowMessage('SQL error ' + IntToStr(Error))
  else begin
    try
      // Save the text to a temporary file
      Source.SaveToFile(TempFilename);
    except
      on E:Exception do
      begin
        ShowMessage(E.Message);
        Result := False;
      end;
    end;
  end;
  Source.Free;
end;

// Determine the destination file name
function GetDestination: string;
var ObjectType, ObjectOwner, ObjectName: PChar;
    Registry: TRegistry;
    LastDir: string;
begin
  // Determine the last used directory, as stored in the regitsry
  Registry := TRegistry.Create;
  Registry.RootKey := HKEY_CURRENT_USER;
  if Registry.OpenKey(SYS_Registry + '\WrapPlugIn', True) then
    LastDir := Registry.ReadString('LastDir')
  else
    LastDir := '';
  // Determine the object name, to be used as a default filename
  IDE_GetBrowserInfo(ObjectType, ObjectOwner, ObjectName);
  // Create a dialog to ask for a destination filename
  with TSaveDialog.Create(nil) do
  begin
    // Set various properties of the SaveDialog
    Title      := 'Save wrapped output file as';
    DefaultExt := 'plb';
    Filter     := 'Wrapped files (*.plb)|*.plb|All files (*.*)|*.*';
    InitialDir := LastDir;
    Filename   := AnsiLowerCase(ObjectName);
    Options    := [ofOverwritePrompt];
    // Execute it
    if not Execute then
      Result := ''
    else begin
      // Save the destination directory in the registry
      Result := Filename;
      Registry.WriteString('LastDir', ExtractFilePath(Filename));
    end;
  end;
  Registry.Free;
end;

// Wrap the program unit currently selected in the Browser
procedure WrapIt;
var WrapCommand: string;
    Destination: string;
begin
  // Check if we can actually wrap
  if WrapExe = '' then
  begin
    ShowMessage('Wrap executable not found in ' + SYS_OracleHome + 'bin');
    Exit;
  end;
  // Ask for the destination filename
  Destination := GetDestination;
  // If successful, continue
  if Destination <> '' then
  begin
    // Save the currently selected program unit to a temporary file
    if SaveProgramUnit then
    begin
      // If successfully saved, execute the wrap command
      WrapCommand := Format('%s iname="%s" oname="%s"', [WrapExe, TempFilename, Destination]);
      WinExec(PChar(WrapCommand), sw_Normal);
    end;
  end;
end;

// Plug-In identification, a unique identifier is received and
// the description is returned
function IdentifyPlugIn(ID: Integer): PChar;  cdecl;
begin
  PlugInID := ID;
  Result := Desc;
end;

// Registration of PL/SQL Developer callback functions
procedure RegisterCallback(Index: Integer; Addr: Pointer); cdecl;
begin
  case Index of
     2 : @SYS_Registry := Addr;
     4 : @SYS_OracleHome := Addr;
    10 : @IDE_MenuState := Addr;
    13 : @IDE_GetBrowserInfo := Addr;
    40 : @SQL_Execute := Addr;
    42 : @SQL_Eof := Addr;
    43 : @SQL_Next := Addr;
    44 : @SQL_Field := Addr;
  end;
end;

// Creating a menu item
function CreateMenuItem(Index: Integer): PChar;  cdecl;
begin
  Result := '';
  case Index of
    1 : Result := 'Tools / &Wrap program unit...';
  end;
end;

// Depending on the selected object in the Browser, enable/disable the menu item
procedure OnBrowserChange;
var ObjectType, ObjectOwner, ObjectName: PChar;
    Enabled: Boolean;
begin
  IDE_GetBrowserInfo(ObjectType, ObjectOwner, ObjectName);
  Enabled := (ObjectType = 'FUNCTION') or (ObjectType = 'PROCEDURE') or
             (ObjectType = 'PACKAGE')  or (ObjectType = 'PACKAGE BODY') or
             (ObjectType = 'TRIGGER')  or (ObjectType = 'TYPE') or
             (ObjectType = 'TYPE BODY');
  IDE_MenuState(PlugInID, 1, Enabled);
end;

// When the Plug-In gets activated, call OnBrowserChange to de/activate the menu
procedure OnActivate; cdecl;
begin
  if WrapExe = '' then GetWrapExe;
  OnBrowserChange;
end;

// The menu item got selected
procedure OnMenuClick(Index: Integer);  cdecl;
begin
  case Index of
    1 : WrapIt;
  end;
end;

exports // The export functions
  IdentifyPlugIn,
  CreateMenuItem,
  RegisterCallback,
  OnMenuClick,
  OnActivate,
  OnBrowserChange;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产综合| 奇米影视7777精品一区二区| 一区二区三区色| 日本一道高清亚洲日美韩| 岛国精品一区二区| 91麻豆精品国产91久久久| 一区精品在线播放| 国产精品一区二区黑丝| 欧美一区二区播放| 亚洲国产美国国产综合一区二区 | 国产欧美一区二区精品性色超碰| 亚洲影视在线播放| 一本一道久久a久久精品| 久久久久久久一区| 日本不卡一二三| 在线看日韩精品电影| 中文字幕在线观看不卡| 国产精品影音先锋| 久久久久久久免费视频了| 久久66热re国产| 日韩一区二区视频在线观看| 亚洲成人av中文| 欧美日韩亚洲综合在线 | 一区免费观看视频| 国产91精品精华液一区二区三区 | 国产精品天干天干在观线| 国产精品自拍一区| 久久只精品国产| 国产呦萝稀缺另类资源| 久久精品亚洲麻豆av一区二区 | 国产蜜臀av在线一区二区三区| 日韩激情在线观看| 欧美一级精品大片| 国产综合色产在线精品| 久久青草国产手机看片福利盒子| 久久国产剧场电影| 久久综合九色综合欧美亚洲| 国产精品性做久久久久久| 久久免费视频一区| 国产成人aaa| 国产精品久久久久久久久果冻传媒| 国v精品久久久网| 国产精品传媒视频| 欧美性受xxxx黑人xyx性爽| 亚洲成人综合视频| 国产麻豆午夜三级精品| 久久精品国内一区二区三区| 538prom精品视频线放| 五月婷婷综合激情| 日韩一区二区免费视频| 国产一区二区三区免费看 | 欧美二区三区91| 日韩主播视频在线| 日韩欧美你懂的| 成人短视频下载| 亚洲综合一区二区三区| 欧美人狂配大交3d怪物一区| 精品一区二区在线播放| 国产精品久久久久久亚洲毛片| 91在线小视频| 日本不卡在线视频| 欧美国产一区视频在线观看| 91在线国内视频| 亚洲福利一二三区| 国产视频在线观看一区二区三区| 91麻豆成人久久精品二区三区| 亚洲午夜电影网| 精品国产成人系列| 色琪琪一区二区三区亚洲区| 日本三级韩国三级欧美三级| 国产精品久久久久久亚洲伦 | 精品第一国产综合精品aⅴ| 国产91丝袜在线播放九色| 一区二区三区中文在线观看| 在线播放欧美女士性生活| 国产精品99久| 日韩中文字幕一区二区三区| 欧美国产欧美综合| 欧美久久久久免费| 国产69精品久久久久777| 亚洲成人中文在线| 国产精品国产三级国产有无不卡| 日韩一级片在线观看| 99免费精品在线| 久久精品国产一区二区| 亚洲小说欧美激情另类| 国产精品久久久久久久久快鸭| 日韩视频国产视频| 欧美日韩国产美| 在线观看日韩精品| 91麻豆国产福利在线观看| 国产麻豆91精品| 久久精品二区亚洲w码| 亚洲成av人片在www色猫咪| 中文字幕第一区第二区| 精品国产人成亚洲区| 欧美精品丝袜久久久中文字幕| 91免费观看国产| 成人激情动漫在线观看| 激情五月激情综合网| 麻豆一区二区三| 午夜精品久久久久久久久久 | 一区二区三区视频在线观看| 欧美国产1区2区| 久久久噜噜噜久久人人看 | 欧美电影在线免费观看| 在线精品视频一区二区| 在线亚洲+欧美+日本专区| 91在线观看一区二区| 成人黄动漫网站免费app| 国产不卡视频一区| 粉嫩av一区二区三区在线播放 | 欧美三级中文字幕| 日本韩国欧美一区二区三区| 色婷婷综合视频在线观看| 色综合天天天天做夜夜夜夜做| a4yy欧美一区二区三区| www.欧美日韩| 色综合天天天天做夜夜夜夜做| 色综合一个色综合| 欧美日韩国产小视频| 欧美一区二区三区啪啪| 精品1区2区在线观看| 欧美经典一区二区| 亚洲国产电影在线观看| 亚洲日本在线天堂| 亚洲国产一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 欧美精品久久天天躁| 777xxx欧美| 久久亚洲精精品中文字幕早川悠里 | 久久国产乱子精品免费女| 国产真实精品久久二三区| 国产成人精品在线看| 色视频一区二区| 日韩欧美国产一区在线观看| 久久亚洲综合av| 亚洲免费观看高清完整| 日韩高清不卡在线| 风间由美性色一区二区三区| 欧美羞羞免费网站| 精品国产麻豆免费人成网站| 国产精品午夜在线观看| 亚洲资源在线观看| 久久精品国产99国产| 99精品视频一区| 日韩亚洲欧美一区二区三区| 国产精品美女久久久久av爽李琼| 一区二区国产盗摄色噜噜| 麻豆一区二区三| 在线观看欧美精品| 久久久青草青青国产亚洲免观| 亚洲自拍欧美精品| 高清成人免费视频| 欧美日韩国产另类不卡| 中文字幕欧美三区| 青青草91视频| 日本久久电影网| 国产亚洲精品精华液| 亚洲h在线观看| 波多野结衣中文字幕一区| 欧美情侣在线播放| 欧美经典三级视频一区二区三区| 午夜精品成人在线视频| 成人成人成人在线视频| 久久亚洲二区三区| 免费观看一级欧美片| 色婷婷综合久久久中文字幕| 国产午夜精品理论片a级大结局 | 欧美精品一区二区三区在线| 夜夜精品视频一区二区| 国产suv精品一区二区三区| 日韩午夜在线观看| 一区二区三区在线不卡| 国产suv一区二区三区88区| 日韩欧美国产小视频| 首页国产丝袜综合| 日本精品裸体写真集在线观看| 欧美极品美女视频| 国产一二精品视频| 精品国产一区二区三区久久久蜜月| 丝袜美腿成人在线| 欧美日韩国产综合草草| 亚洲一区免费观看| 成人网男人的天堂| 国产欧美日韩在线观看| 国产精品综合二区| 久久免费视频一区| 国产乱淫av一区二区三区| 精品国产不卡一区二区三区| 麻豆精品视频在线| 日韩欧美亚洲一区二区| 日本怡春院一区二区| 欧美一三区三区四区免费在线看| 亚洲电影你懂得| 欧美日韩国产一区| 日韩黄色免费网站| 日韩一区二区三区四区| 蜜臀va亚洲va欧美va天堂| 精品少妇一区二区三区日产乱码 |