zoukankan      html  css  js  c++  java
  • CodeSmith的OracleProviders

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

    献上Oracle导出数据的模板:

    <%@ CodeTemplate Language="C#" TargetLanguage="PL-SQL" Description="??Oracle????????" %>
    <%@ Assembly Name="SchemaExplorer" %>
    <%@ Import Namespace="SchemaExplorer" %>
    <%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context" Description="" %>
    Created 
    <%=DateTime.Now %>
    <%for(int intRow=0;intRow<SourceTableData.Rows.Count;intRow++)%>
    insert into 
    <%=GetTableOwner() %><%=SourceTable.Name %>(<%=AllColumns %>)
    values (
    <%=AllDate(intRow) %>);
    <%}
    %>
    <script runat="template">
    private DataTable _sourceTableData;
    private string _allColumns;
    private string _allData;

    SourceTableData

    AllColumns

    AllData

    FormatData

    public string GetTableOwner()
    {
        
    return GetTableOwner(true);
    }


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

        
    else
        
    {
            
    return "";
        }

    }


    </script>

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

  • 相关阅读:
    小总结:fibonacci数的产生
    pick the stone game
    温故知新的错题训练:Coin game
    《博弈论的诡计》
    思维+博弈论:字符串操作
    一下午的编程思索录
    2018中国大学生程序设计竞赛
    温故知新的经典贪心题目:今年暑假不AC?
    2019-2020新学的一些东西(持续更新)
    【半平面交】JZOJ3297. 【SDOI2013】逃考
  • 原文地址:https://www.cnblogs.com/mmmhhhlll/p/824635.html
Copyright © 2011-2022 走看看