随笔分类 - PB
摘要:将ntwdblib.DLL复制到Sybase\Shared\PowerBuilder目录下unable to load the requested database interface,无法创建数据源
阅读全文
摘要://判断25码的校验位是否正确///*交叉25码校验位的计算规则。交叉25码的校验位计算方法是 Mod 10 :1、字符个数为偶数时为:10的倍数-[奇数位的数字之和(从左至右)+(偶数位数字之和)*3个位数] 2、字符个数为奇数时为:10的倍数-[偶数位的数字之和(从左至右)+(奇数位数字之和)*3个位数] 如: 514362的校验位为10*X-[(5+4+6)+3*(1+3+2)]=7(因加校验位后个数为奇数,故前面加0后为05143627。 76534的校验位为10*X-[(6+3)+3*(7+5+4)]=3*///string ls_checkcode//ls_checkc...
阅读全文
摘要:string ls_log_path,ls_txt string ls_rtn ls_log_path=idt_card.is_imgfile long ll_file ll_file=fileopen(ls_log_path,linemode!,Read!,LockWrite!,Append! ) ll_rtn=fileread(ll_file,ls_txt) do while ll_rtn>=0 ls_rtn+=ls_txt ll_rtn=fileread(ll_file,ls_txt) loop fileclose(ll_file)
阅读全文
摘要:ls_tmp="20121212" ls_sr=mid(ls_tmp,7,8) ls_sr=mid(ls_sr,1,4)+'-'+mid(ls_sr,5,2)+'-'+mid(ls_sr,7,2) this.object.birthday[row] = datetime(date(ls_sr))ll_days=daysafter(date(2010-01-01),today()) * 24 * 60 * 60ll_tims=secondsafter(00:00:00,time(string(today(),'HH:mm:ss'
阅读全文
摘要:1、数据库字段修改为textselect convertf(text,sql) as sql from tablename2、transaction的属性修改Transaction ltr_tmpltr_tmp = Create Transactionltr_tmp.DBMS = sqlca.DBMSltr_tmp.Database = sqlca.Databaseltr_tmp.ServerName = sqlca.ServerNameltr_tmp.LogID = sqlca.LogIDltr_tmp.AutoCommit = sqlca.AutoCommitltr_tmp.DBParm.
阅读全文
摘要:pb中数据窗口的saveas方法导出数据效率比较高,但是不能导出中文表头,下面代码解决了这个问题原理,1、用saveas方法导出文件 2、用ole控件excel.application操作导出的excell文件,修改表头。代码如下代码缺点:不能导出计算字段
阅读全文
摘要:dw_detail.setcolumn("colname")dw_detail.SelectText(1, Len(dw_detail.GetText()))
阅读全文
摘要:$PBExportHeader$gf_getfirstinfo.srfglobal type gf_getfirstinfo from function_objectend typeforward prototypesglobal function string gf_getfirstinfo (string as_source, string as_bef, string as_aft)end prototypesglobal function string gf_getfirstinfo (string as_source, string as_bef, string as_aft);//
阅读全文
摘要:$PBExportHeader$uf_exesqlfile.srfglobal type uf_exesqlfile from function_objectend typeforward prototypesglobal function integer uf_exesqlfile (string astr_file, transaction atrs_sql)end prototypesglobal function integer uf_exesqlfile (string astr_file, transaction atrs_sql);int fstring ls_filels_fi
阅读全文
摘要://-----------------通过sql语句动态创建一个datastore对象//gf_getdsfromsql//datastore:adw_dw//string:as_sql//transaction:atrs_sqlcastring ERRORS, sql_syntaxstring presentation_str, dwsyntax_strsql_syntax = as_sqlpresentation_str = "style(type=grid)"dwsyntax_str = atrs_sqlca.SyntaxFromSQL(sql_syntax, pre
阅读全文
摘要:getitemstatus和setitemstatusNotModified!:没有修改过DataModified!:修改过New!:数据时新增的还没有输入数据NewModified!:改行数据时新增的,且已经做了修改
阅读全文
摘要:列的protect 属性case( flag when '0' then 1 else 0)
阅读全文
摘要:if tab_1.tpg_1.dw_1.update(true,false) = -1 & or tab_1.tpg_2.dw_2.update(true,false) = -1 or tab_1.tpg_3.dw_4.update(true,false) = -1 then string ls_sqlerr ls_sqlerr = sqlca.sqlerrtext rollback; messagebox('提示!','存盘错误,数据库错误为:' + ls_sqlerr) return -1else commit; tab_1.tpg_1.dw_1.r
阅读全文
摘要:$PBExportHeader$uf_stringsplit.srfglobal type uf_stringsplit from function_objectend typeforward prototypesglobal function integer uf_stringsplit (string astr_str, string astr_split, ref string astr_rtn[])end prototypesglobal function integer uf_stringsplit (string astr_str, string astr_split, ref s
阅读全文
摘要:$PBExportHeader$gf_getmoney.srf$PBExportComments$获取金额的大写格式global type gf_getmoney from function_objectend typeforward prototypesglobal function string gf_getmoney (decimal dsum)end prototypesglobal function string gf_getmoney (decimal dsum);/*-----------------------------------功能描述:获取一个金额的大写格式--参数及返
阅读全文
摘要:$PBExportHeader$uf_replace.srfglobal type uf_replace from function_objectend typeforward prototypesglobal function string uf_replace (string astr_str, string astr_old, string astr_new)end prototypesglobal function string uf_replace (string astr_str, string astr_old, string astr_new);string old_str,
阅读全文
摘要:/*-----------------------------------功能描述:获取一个金额的大写格式--参数及返回值说明:dsum:decimal类型--returnvaleu:string类型---------------------------------*/boolean digit = falseint i,n,lengthstring temp,temp1,temp2,upper1...
阅读全文
摘要:ole_browse.width=newwidth - 40ole_browse.height=newheight - 160ole_browse.object.width = UnitsToPixels( newwidth - 40, XUnitsToPixels!)ole_browse.object.height = UnitsToPixels( newheight - 160, YUnits...
阅读全文
摘要:ole_browse.object.document.parentwindow.execscript('document.onselectstart=new Function("event.returnValue=false;")','JavaScript')ole_browse.object.document.parentwindow.execscript('document.oncontext...
阅读全文
摘要:引用http://www.cnblogs.com/gghxh/archive/2007/05/08/739357.html在不是js打开的页面上按window.close(), 会有提示框,很烦,现在可以不用了,没有提示框直接关闭窗口。试试下面代码:<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11...
阅读全文

浙公网安备 33010602011771号