資源簡介
可以連接oracle的CodeSmith自動生成代碼工具,需要安裝CodeSmith及數據庫客戶端??梢宰詣由蓪嶓w類及數據庫操作層代碼,方便快捷。

代碼片段和文件信息
//-------------------------------------------------------------
//?CodeSmith?DBDocumenter?Templates?v3.0
//?Author:??Jason?Alexander?(jalexander@telligent.com)?Eric?J.?Smith
//-------------------------------------------------------------
using?System;
using?System.IO;
using?System.Data;
using?System.Data.SqlClient;
using?System.ComponentModel;
using?System.ComponentModel.Design;
using?CodeSmith.Engine;
using?SchemaExplorer;
public?class?DBDocumenterTemplate?:?CodeTemplate
{
//?Number?of?columns?that?should?be?displayed?on?the?summary?lists.
public?const?int?NUM_OF_COLUMNS?=?3;
private?string?_outputDirectory?=?String.Empty;
public?DBDocumenterTemplate()?:?base()
{
}
??
[Editor(typeof(System.Windows.Forms.Design.FolderNameEditor)?typeof(System.Drawing.Design.UITypeEditor))]?
[Optional]
[Category(“Output“)]
[Description(“The?directory?to?output?the?results?to.“)]
public?string?OutputDirectory?
{
get
{
//?default?to?the?directory?that?the?template?is?located?in
if?(_outputDirectory.Length?==?0)?return?this.CodeTemplateInfo.DirectoryName?+?“output\\“;
return?_outputDirectory;
}
set
{
if?(!value.EndsWith(“\\“))?value?+=?“\\“;
_outputDirectory?=?value;
}?
}
public?void?OutputTemplate(CodeTemplate?template)
{
this.CopyPropertiesTo(template);
template.Render(this.Response);
}
public?SqlDataReader?GetSystemInformation(string?connectionString)
{
SqlConnection?cn?=?new?SqlConnection(connectionString);
SqlCommand?cmd?=?new?SqlCommand();
cmd.Connection?=?cn;
cmd.CommandText?=?“master.dbo.xp_msver“;
cmd.CommandType?=?CommandType.StoredProcedure;
cn.Open();
SqlDataReader?reader?=?cmd.ExecuteReader(CommandBehavior.CloseConnection);
return?reader;
}
public?void?OutputExceptionInformation(Exception?exception?int?indentLevel)
{
int?originalIndentLevel?=?Response.IndentLevel;
Response.IndentLevel?=?indentLevel;
Response.WriteLine(““);
Response.WriteLine(““);
Response.WriteLine(“ “);
Response.WriteLine(“ “);
Response.WriteLine(“ An?exception?occurred?while?attempting?to?execute?the?template:“?);
Response.WriteLine(“ “?+?exception.Message);
Response.WriteLine(“ “);
Response.WriteLine(“ “);
Response.WriteLine(“ “);
Response.WriteLine(“
“);
Response.IndentLevel?=?originalIndentLevel;
}
public?void?OutputSystemInformation(string?connectionString?int?indentLevel)
{
SqlDataReader?info?=?null;
try
{
info?=?this.GetSystemInformation(connectionString);
int?originalIndentLevel?=?Response.IndentLevel;
Response.IndentLevel?=?indentLevel;
Response.WriteLine(““);
while?(info.Read())
{
Response.WriteLine(““);
Response.WriteLine(“ “);
Response.WriteLine(“ “);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????18004??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\Bll\aa
?????文件??????14575??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\Bll\DBMad.BLL.cst
?????文件????????524??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\Bll\DBMad.DAL.csp
?????文件??????29948??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\Bll\DBMad.DAL.cst
?????文件??????13830??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\Bll\DBMad.Models.cst
?????文件??????13128??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\CodeGenerator.cst
?????文件??????10624??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\ActiproSoftware.SQL.xml
?????文件????????455??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\Database.csp
?????文件???????4929??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\DBDocumenterTemplate.cs
?????文件???????1052??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\footer.cst
?????文件???????1426??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\general.cst
?????文件???????2586??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\header.cst
?????文件???????4636??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\master.cst
?????文件???????2212??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\dbdocs.css
?????文件???????1037??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\arrow.gif
?????文件????????881??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\check_icon.gif
?????文件????????904??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\database_icon.gif
?????文件????????910??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\folder_icon.gif
?????文件????????909??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\key_icon.gif
?????文件???????1530??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\server.gif
?????文件????????928??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\server_icon.gif
?????文件????????920??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\stored_proc_icon.gif
?????文件????????900??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\tables_icon.gif
?????文件????????857??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\unchecked_icon.gif
?????文件????????884??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\images\views_icon.gif
?????文件???????6613??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\index.html
?????文件???????1805??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\sprocs.html
?????文件???????2304??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\sproc_0.html
?????文件???????2149??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\sproc_1.html
?????文件???????1574??2012-08-14?09:27??三層構架的CodeSmith模板--oracle--修改后\DBDocumenter\output\sproc_2.html
............此處省略119個文件信息
- 上一篇:SQL常用函數
- 下一篇:問道1.60純凈數據庫MYSQL
評論
共有 條評論
相關資源
-
實現Oracle數據庫每天異地自動備份
-
windows下oracle數據庫備份壓縮刪除歷史
-
用Linux命令完成Oracle自動物理備份
-
破解oracle密碼的工具orabf-v0[1].7.6.zip
-
Oracle向Syba
se ASE遷移指南
-
用NetBackup恢復Oracle數據庫到異機
-
認識NBU備份Oracle時Code 29錯誤的解答
-
Backup_Exec_ORACLE_RAC_數據庫備份恢復指導
-
通過Backup Exec實施Oracle來災難恢復
-
通過Backup Exec實施Oracle災難恢復
-
Oracle中空間管理對系統性能的影響
-
Oracle 10g數據庫的安全性和身份管理
-
Oracle RAC恢復到單機方案-僅有一個全備
-
oracle數據庫比對工具
-
Oracle非常好的入門、深入PPT
-
Oracle數據庫基礎知識(華為內部培訓
-
非常好的Oracle課件
-
Oracle產品助力青島啤酒發展
-
Sun/Oracle9i RAC方案在英國BACS公司的應用
-
Oracle Linux 6.8 x86_64
-
oracle 到mysql轉換工具
-
利用Oracle復制技術的災備解決方案
-
Oracle中的優化器如何進行評估優化
-
如何選擇Oracle優化器使你事半功倍
-
Oracle中文API
-
oraclesql高級編程 隨書腳本
-
oci.dll of Oracle11g
-
oracle11g 版本 11.2.0.1.0 幫助文檔
-
oracle 11g oci.dll for Navicate
-
oracle 11g localhost可以訪問,ip不能訪問