CodeSmith的OracleProviders

网上发现一个CodeSmith的OracleProviders,希望对大家有帮助

献上Oracle导出数据的模板:

CodeSmith的OracleProviders <% @ CodeTemplate Language = " C# "  TargetLanguage = " PL-SQL "  Description = " ??Oracle???????? "   %>
CodeSmith的OracleProviders
<% @ Assembly Name = " SchemaExplorer "   %>
CodeSmith的OracleProviders
<% @ Import Namespace = " SchemaExplorer "   %>
CodeSmith的OracleProviders
<% @ Property Name = " SourceTable "  Type = " SchemaExplorer.TableSchema "  Category = " Context "  Description = ""   %>
CodeSmith的OracleProvidersCreated 
<%= DateTime.Now  %>
CodeSmith的OracleProviders
<% for ( int  intRow = 0 ;intRow < SourceTableData.Rows.Count;intRow ++ ) %>
CodeSmith的OracleProvidersinsert into 
<%=GetTableOwner() %><%=SourceTable.Name %>(<%=AllColumns %>)
CodeSmith的OracleProvidersvalues (
<%=AllDate(intRow) %>);
CodeSmith的OracleProviders
<%}
%>
CodeSmith的OracleProviders
< script runat = " template " >
CodeSmith的OracleProviders
private  DataTable _sourceTableData;
CodeSmith的OracleProviders
private   string  _allColumns;
CodeSmith的OracleProviders
private   string  _allData;
CodeSmith的OracleProviders
CodeSmith的OracleProviders
SourceTableData
CodeSmith的OracleProviders
CodeSmith的OracleProviders
AllColumns
CodeSmith的OracleProviders
CodeSmith的OracleProviders
AllData
CodeSmith的OracleProviders
CodeSmith的OracleProviders
FormatData
CodeSmith的OracleProviders
CodeSmith的OracleProviders
public   string  GetTableOwner()
CodeSmith的OracleProviders
{
CodeSmith的OracleProviders    
return GetTableOwner(true);
CodeSmith的OracleProviders}

CodeSmith的OracleProviders
CodeSmith的OracleProviders
public   string  GetTableOwner( bool  includeDot)
CodeSmith的OracleProviders
{
CodeSmith的OracleProviders    
if (SourceTable.Owner.Length > 0)
CodeSmith的OracleProviders    
{
CodeSmith的OracleProviders        
return  SourceTable.Owner + ".";
CodeSmith的OracleProviders    }

CodeSmith的OracleProviders    
else
CodeSmith的OracleProviders    
{
CodeSmith的OracleProviders        
return "";
CodeSmith的OracleProviders    }

CodeSmith的OracleProviders}

CodeSmith的OracleProviders
CodeSmith的OracleProviders
</ script >
CodeSmith的OracleProviders

Copy Provider DLL 文件到 CodeSmith的安装路径(D:\Program Files\CodeSmith\v4.0\SchemaProviders)
就可以用CodeSmith连接Oracle 数据库。
文件下载

你可能感兴趣的:(Provider)