数据库

本类阅读TOP10

·SQL语句导入导出大全
·Power Designer杂记
·SQL Server日期计算
·常用的oracle函数使用说明(一)
·sqlserver2000数据库置疑的解决方法
·MS SQLServer OLEDB分布式事务无法启动的一般解决方案
·SQL to Excel 的应用
·SQL语句导入导出大全
·Error:ORA-01033:ORACLE initialization or shutdown in progress错误解决
·Oracle中password file的作用及说明

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
取数据窗口发生变化的一个函数(补充篇)

作者:未知 来源:月光软件站 加入时间:2005-5-13 月光软件站

取数据窗口发生变化的一个函数(补充篇)
by ...---... (QQ:21417511)

前几天收到一份MAIL,说上文《取数据窗口发生变化的一个函数》写的函数中代码没放全,仔细看了一下,是用了另外一些函数,在此表示道歉啦。现在补全那些函数:of_strip() , of_getitem() , of_getstring() ,  uf_isnull(),不同的函数用不同颜色区分开了。

各位看官有兴趣自己看着改改吧……  :)

/*------------------------------------------------------------------------------

 Function:   public u_dw.of_Strip

 Returns:         String

 Parameters:      value String a_szarg

 Description:  

--------------------------------------------------------------------------------
 2005-4-25 2.0.0  Initial version by cuixuf (Mail:cuixuf@sina.com)
------------------------------------------------------------------------------*/

Integer nLength, nPos

nLength = Len( a_szArg)

For nPos = 1 To nLength
 Choose Case Mid( a_szArg, nPos, 1)
  Case "~t", "~r", "~n", '"',":"
   a_szArg = Replace( a_szArg, nPos, 2, "  ")
 End Choose
Next

Return Trim( a_szArg)

/*------------------------------------------------------------------------------

 Function:   public u_dw.of_Getitem

 Returns:         Any

 Parameters:      value DataStore ads_target
                  value Integer ai_row
                  value Integer ai_col
                  value String as_type

 Description:  

--------------------------------------------------------------------------------
 2005-4-25 2.0.0  Initial version by cuixuf (Mail:cuixuf@sina.com)
------------------------------------------------------------------------------*/

Choose Case Left(as_type,5)
 Case Left("char(n)",5)
  return ads_target.GetItemString(ai_row,ai_col)
 Case Left("date",5)
  return ads_target.GetItemDate(ai_row,ai_col)
 Case Left("datetime",5)
  return ads_target.GetItemDateTime(ai_row,ai_col)
 Case Left("decimal",5)
  return ads_target.GetItemDecimal(ai_row,ai_col)
 Case "int","long",Left("number",5),"real","ulong"
  return ads_target.GetItemNumber(ai_row,ai_col)
End Choose

/*------------------------------------------------------------------------------

 Function:   public u_dw.of_Getitem

 Returns:         Any

 Parameters:      value Integer ai_row
                  value Integer ai_col
                  value String as_type

 Description:  

--------------------------------------------------------------------------------
 2005-4-25 2.0.0  Initial version by cuixuf (Mail:cuixuf@sina.com)
------------------------------------------------------------------------------*/

Choose Case Left(as_type,5)
 Case Left("char(n)",5)
  return this.GetItemString(ai_row,ai_col)
 Case Left("date",5)
  return this.GetItemDate(ai_row,ai_col)
 Case Left("datetime",5)
  return this.GetItemDateTime(ai_row,ai_col)
 Case Left("decimal",5)
  return this.GetItemDecimal(ai_row,ai_col)
 Case "int","long",Left("number",5),"real","ulong"
  return this.GetItemNumber(ai_row,ai_col)
End Choose

/*------------------------------------------------------------------------------

 Function:   public u_dw.of_Getstring

 Returns:         String

 Parameters:      value Any aa_data
                  value String as_type

 Description:  

--------------------------------------------------------------------------------
 2005-4-25 2.0.0  Initial version by cuixuf (Mail:cuixuf@sina.com)
------------------------------------------------------------------------------*/

if isNull(aa_data) then return "[Null]"

Choose Case Left(as_type,5)
 Case Left("char(n)",5)
  return "'"+string(aa_data)+"'"
 Case Left("date",5),Left("datetime",5),Left("decimal",5),"int","long",Left("number",5),"real","ulong"
  return string(aa_data)
End Choose

/*------------------------------------------------------------------------------

 Function:   public n_functions.uf_Isnull

 Returns:         Boolean

 Parameters:      value String as_str

 Description:  

--------------------------------------------------------------------------------
 2005-4-25 2.0.0  Initial version by cuixuf (Mail:cuixuf@sina.com)
------------------------------------------------------------------------------*/

if isnull(as_str) or trim(as_str) = "" then
 return true
else
 return false
end if

另外说一句,如果大家有什么建议或者叫个好,扔个鸡蛋之类的话,请直接在评论上给出吧,因为我的MAIL中经常会自动把邮件转到垃圾信箱中,上面提到的邮件就是这种情形,不好意思啊……还算好,我在删除垃圾邮件之前,看了一眼,呵呵!

总而言之,欢迎大家评论,也让我知道有同志们关注,这样,我会放出更多的东东,小生在此谢过先!




相关文章

相关软件




月光软件程序下载编程文档电脑教程网站设计网址导航网络文学游戏天地幽默笑话生活休闲写作范文安妮宝贝
电脑技术编程开发网络专区谈天说地情感世界游戏元素分类游戏热门游戏体育运动手机专区业余爱好影视沙龙
音乐天地数码广场教育园地科学大观古今纵横谈股论金人文艺术医学保健动漫图酷二手专区地方风情各行各业

月光软件站·版权所有