Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1074588
  • 博文数量: 1647
  • 博客积分: 80000
  • 博客等级: 元帅
  • 技术积分: 9980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 15:15
文章分类

全部博文(1647)

文章存档

2011年(1)

2008年(1646)

我的朋友

分类:

2008-10-28 18:34:18


  1.清除本地数据
  
  ls_sql1 = "TRUNCATE TABLE" + ls_table [1]
   execute IMMEDIATE :ls_sql1 using sqlca;
  
  2.//打开可以插入自增,显示插入自增字段的值
  
   ls_sql1 = "SET IDENTITY_INSERT " + ls_table [1] + " on"
   execute IMMEDIATE :ls_sql1 using sqlca;
  
  3.构造数据窗口,或datastore
  
  4.wf_set_iden_off_1(dw_1) //关掉本地datastore的自增

  
  wf_set_iden_off_1内容:
  
  //将指定datastore 的自增字段设置为 off
  
  string ls_colcount
  long ll_colcount, i
  string ls_ColName
  
  ls_colcount = ar_ds.Describe("DataWindow.Column.Count")
  
  if integer (ls_colcount) > 0 then
   ll_colcount = integer (ls_colcount)
  else
   return
  end if
  
  string ls_on, ls_err
  
  for i = 1 to ll_colcount
   ls_ColName = ar_ds.Describe("#" + string(i) +".name")
   ls_on = ar_ds.Describe("#" + string(i) +".Identity")
   if ls_on = 'yes' then
  ar_ds.modify (ls_ColName + ".Identity = 'no'" )
   end if
  next
  
  5.开始copy,
  
  6.update

  
  结束
【责编:admin】

--------------------next---------------------

阅读(408) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~