数据库字段:替换数据库中所有字段的值--利用CodeSmith生成sql来源: 发布时间:星期四, 2009年2月12日 浏览:119次 评论:0
替换数据库中所有字段 ![]() ![]() <%-- Name: Author: Description: --%> <%@ CodeTemplate Language=\"C#\" TargetLanguage=\"Text\" Src=\"\" Inherits=\"\" Debug=\"ture\" Description=\"Template description here.\" %> <%@ Property Name=\"DataBase\" Type=\"SchemaExplorer.DatabaseSchema\" %> <%@ Property Name=\"pre_Context\" Type=\" ![]() <%@ Property Name=\"edit_Context\" Type=\" ![]() <%@ Assembly Name=\"SchemaExplorer\" %> <%@ Import Namespace=\"SchemaExplorer\" %> <%@ Assembly Name=\" ![]() <%@ Import Namespace=\" ![]() <%= find ![]() <script runat=\"template\"> ![]() ![]() { ![]() foreach(TableSchema table in this.DataBase.Tables) { ![]() { ![]() ![]() ![]() ![]() for( ![]() ![]() { Keys[keycount] = table.PrimaryKey.MemberColumns[keycount].Name; } DataTable datatable = table.GetTableData ![]() foreach(ColumnSchema column in table.Columns) { foreach( ![]() { ![]() ![]() ![]() ![]() { result ![]() ![]() column.Name + \"=\" + \"\'\" + str. ![]() ![]() \"1=1 \"; foreach( ![]() { result ![]() ![]() ![]() } result ![]() } } } } } ![]() } </script> 0
相关文章读者评论发表评论 |