当前位置: 首页 > news >正文

泰兴网站建设网站建设做网站

泰兴网站建设,网站建设做网站,矿业公司网站源码,做免费外贸网站powerdesigner 使用 文章目录powerdesigner 使用1. 建立数据库表模型2. 脚本统一修改表结构#xff08;赋值默认字段、统一删除、统一修改#xff09;2.1.统一添加默认字段#xff1a;2.2.统一删除字段#xff1a;2.3.统一修改表名称#xff1a;2.4. 统一修改字段属性赋值默认字段、统一删除、统一修改2.1.统一添加默认字段2.2.统一删除字段2.3.统一修改表名称2.4. 统一修改字段属性2.5.其他函数1. 建立数据库表模型 1.1.创建模型并选择数据库类型 1.2 建立表 1.3.修改表名称 1.4.编辑表结构 1.5.编辑索引 1.6.查看sql语句 2. 脚本统一修改表结构赋值默认字段、统一删除、统一修改 tools - execute commands - edit/ run Scripe 打开窗口输入vb脚本命令 2.1.统一添加默认字段 对于需要排除在外的表可添加在下面代码中 if instr(,Ex1,Ex2,,,CurrentObject.Code,)0 then exit sub Option Explicit ValidationMode True InteractiveMode im_BatchDim mdl Set mdl ActiveModel If (mdl Is Nothing) ThenMsgBox There is no Active Model ElseListObjects(mdl) End IfPrivate Sub ListObjects(fldr) output Scanning fldr.codeDim obj For Each obj In fldr.childrenTableSetComment objNextDim f For Each f In fldr.Packages ListObjects fNext End SubPrivate Sub TableSetComment(CurrentObject)if not CurrentObject.Iskindof(cls_Table) then exit subif instr(,Ex1,Ex2,,,CurrentObject.Code,)0 then exit subif not CurrentObject.isShortcut thenDim col Dim numdim create_user_iddim create_timedim update_user_iddim update_timedim is_deletecreate_user_id1update_user_id1create_time1update_time1is_delete1for each col in CurrentObject.columnsnum num 1if col.Codecreate_user_id thencreate_user_id100end ifif col.Codecreate_time thencreate_time100end ifif col.Codeupdate_user_id thenupdate_user_id100end ifif col.Codeupdate_time thenupdate_time100end ifif col.Codeis_delete thenis_delete100end ifnextif create_user_id1 then CurrentObject.columns.CreateNewAt(num)for each col in CurrentObject.columns if col.DataType then col.Name创建人col.Codecreate_user_idcol.Comment创建人col.DataTypevarchar(64)col.Mandatory1end if nextnumnum1end ifif create_time1 then CurrentObject.columns.CreateNewAt(num)for each col in CurrentObject.columns if col.DataType then col.Name创建时间col.Codecreate_timecol.Comment创建时间col.DataTypedatetimecol.DefaultValueCURRENT_TIMESTAMPend if nextnumnum1end ifif update_user_id1 then CurrentObject.columns.CreateNewAt(num)for each col in CurrentObject.columns if col.DataType then col.Name修改人col.Codeupdate_user_idcol.Comment修改人col.DataTypevarchar(64) end if nextnumnum1end ifif update_time1 then CurrentObject.columns.CreateNewAt(num)for each col in CurrentObject.columns if col.DataType then col.Name修改时间col.Codeupdate_timecol.Comment修改时间col.DataTypedatetimecol.DefaultValueCURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMPend if nextnumnum1end ifif is_delete1 then CurrentObject.columns.CreateNewAt(num)for each col in CurrentObject.columns if col.DataType then col.Name删除标志col.Codeis_deletecol.Comment删除标志col.DataTypetinyintcol.DefaultValue0end if nextnumnum1end ifend if End Sub2.2.统一删除字段 对于需要排除在外的表可添加在下面代码中 if instr(,Ex1,Ex2,,,tab.Code,)0 then Option Explicit ValidationMode True InteractiveMode im_BatchDim mdl Set mdl ActiveModel If (mdl Is Nothing) Then MsgBox There is no current Model ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox The current model is not an Physical Data model. Else ProcessFolder mdl End IfPrivate sub ProcessFolder(CurrentObject)Dim Tab for each Tab in CurrentObject.tablesif instr(,Ex1,Ex2,,,tab.Code,)0 then if not tab.isShortcut thenDim col for each col in tab.columnsif instr(col.code,update_user_id)0 thencol.Deleteend ifif instr(col.code,update_time)0 thencol.Deleteend ifif instr(col.code,create_user_id)0 thencol.Deleteend ifif instr(col.code,create_time)0 thencol.Deleteend ifnextend ifend ifnext MsgBox successend sub2.3.统一修改表名称 Option Explicit ValidationMode True InteractiveMode im_BatchDim mdl Set mdl ActiveModel If (mdl Is Nothing) Then MsgBox There is no current Model ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox The current model is not an Physical Data model. ElseProcessFolder mdl End IfPrivate sub ProcessFolder(CurrentObject)Dim Tab Dim NameStr , CodeStrfor each Tab in CurrentObject.tables Tab.name Replace( Tab.name , ori_name , new_name)Tab.code Replace( Tab.code , s_ , student_)nextMsgBox success end sub2.4. 统一修改字段属性 对于需要排除在外的表可添加在下面代码中 if instr(,Ex1,Ex2,,,tab.Code,)0 then dim model set model ActiveModel If (model Is Nothing) ThenMsgBox There is no current ModelElseIf Not model.IsKindOf(PdPDM.cls_Model) ThenMsgBox The current model is not an Physical Data model.ElseProcessTables modelProcessSequences modelMsgBox success End Ifsub ProcessSequences(folder)dim sequencefor each sequence in folder.sequencessequence.name LCase(sequence.name)sequence.code LCase(sequence.code)nextend subsub ProcessTables(folder)dim tablefor each table in folder.tablesif instr(,Ex1,Ex2,,,table.Code,)0 then if not table.IsShortCut then ProcessTable tableend ifend ifnextdim subFolderfor each subFolder in folder.PackagesProcessTables subFoldernext end subsub ProcessTable(table)dim colfor each col in table.Columnsif col.code s_name then col.code student_name col.DataType vachar(64)col.DefaultValue1col.Mandatory0end ifcol.code LCase(col.code)col.name LCase(col.name)next table.name UCase(table.name)table.code UCase(table.code)end sub对于其他需要修改的属性可在ProcessTable方法中自定义编辑代码 2.5.其他函数 在2.4.中将ProcessTables subFolder调用的方法替换为下述方法即可 表字段的部分替换 sub ReplaceCol(table)dim colfor each col in table.Columnsif instr(col.code,qty)0 then col.code Replace(col.code,qty,quantity)end ifif instr(col.code,amt)0 then col.code Replace(col.code,amt,amount)end ifnext end sub
http://www.zqtcl.cn/news/621456/

相关文章:

  • 网站内容收费WordPress之类的
  • 好网站推荐一下网站建设客户评价
  • 重庆交通网站建设wordpress08模板
  • 网站搭建响应式wordpress访客切换主题
  • 标准网站建设推荐帮别人做网站开票开什么税目
  • 温州网站优化衡阳县专业做淘宝网站
  • 门户网站建设存在的问题和差距无锡做智能网站
  • 受欢迎的常州做网站网站制作ppt
  • 物流网站建设实例 天堂资源帝
  • 太原建设厅官方网站wordpress 导入工具
  • 做网站树立品牌形象建设了网站后怎么用谷歌引流
  • 专业公司网站建设建设人才库网站
  • 怎么自己做直播网站吗手机免费建站app
  • 惠州规划建设局网站seo网站关键词排名优化公司
  • 关键词检测百度seo一本通
  • 做效果图的外包网站徐州低价seo
  • xp系统中做网站服务器吗网站设计版权
  • 化妆品网站建设经济可行性分析怎么做好网站
  • 软件企业网站建设栏目结构图服务公司有哪些
  • 郑州专业做淘宝网站推广哪些公司需要网站开发工程师
  • 如何为企业做网站单页网站推广
  • 做公众号封面图的网站凡客精选app
  • 张家界做旅游网站网业小说畅读服务
  • 短租网站那家做的好网络设计工作好找吗
  • 企业建网站哪家好网络书签 wordpress
  • 网站策划的工作职责有关网站开发的创意
  • 上国外网站dns如何免费做网站推广
  • wordpress导航站的源码网页设计与制作微课教程第4版李敏
  • 建站的好公司wordpress 小工具 调用
  • 郑州高考网站建设wordpress调用多个底部