发信人: davy_liu() 
整理人: leitiger(2002-06-05 23:47:38), 站内信件
 | 
 
 
【 在 wutongyu (koko) 的大作中提到: 】
 : 【 在 xy.h (alex-to) 的大作中提到: 】
 : : 程序如下:
 : : string ls_sql,ls_syntax,ls_error
 : : long ll_row
 :    .......
 
 sql_syntax = "SELECT"+" 查询语句+	 FROM "+表名
 
 presentation_str = "style(type=grid)"//窗口的格式,就是你用pb建立新dw时 要选择的几种
 
 dwsyntax_str = SQLCA.syntaxfromsql(sql_syntax, &
 presentation_str,errors)
 	
 if len(errors) > 0 then 
 messagebox("错误",&
 	"syntaxfromsql caused these errors: " + errors)
 return
 end if
    
 dw_1.create(dwsyntax_str,errors)
 
 if len(errors) > 0 then 
 messagebox("错误",&
 	"create caused these errors: " + errors)
 	return
 end if
 有一点要注意,如果你在前面设置autocommit为false,这里要先改为true,否则 pb认为dw不可更新,会出现一抱错win,可以在dw_1.retrieve()后再改回去。
  --    /"MWWM"\     _/_/_/_/      _/_/  _/_/ _/_/ _/ _/__/
  q(‘e  e’)p     _/    _/   _/  _/  _/   _/   _/ __/ 
    ///@\\\       _/     _/  _/   _/  _/  _/    _/__/
  /-\\\^///-\    _/     _/  _/_/_/_/  _/ _/      __/
 ||  // \\  ||_/_/_/_/_/ _/_/     _/  _/_/    _/__/
 ||_// ? \\_|| ----有时也想找个朋友聊,可又怕没聊...     
  ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.102.12.244]
  | 
 
 
 |