What's my mail file size?

We all know, users could care less (most of them, unless you've hounded them enough) or wouldn't even know how to check their mail file size, right? Well, if you have a homepage on your Notes client intranet, or an area where users will eventually stumble upon documents, insert the following code in a button and it will inform your users how much disk space their mail file is utilizing:
Dim s As New NotesSession
Dim db As NotesDatabase
Dim uname As String
Dim mailfileloc As Variant
Const MB_OK = 1
Const MB_ICONINFORMATION=64
boxtype& = MB_OK + MB_ICONINFORMATION

Set db=s.CurrentDatabase

uname = s.CommonUserName
srvname = Evaluate("@Name([CN];@Subset(@MailDBName;1))")
mailfileloc = Evaluate("@Subset(@MailDBName;-1)")

Dim mydb As New NotesDatabase( Cstr(srvname(0)), Cstr(mailfileloc(0)))

Msgbox "Server: " & srvname(0) & Chr$(13) _
& "Db directory and db name: " & mailfileloc(0) & Chr$(13) & Chr$(13)_
& "The size of your mail file is: " _
& Round(mydb.Size/1048576, 2) & "Mb", boxtype&, "Mail file of " & uname & "..."

As long as the user has access to the button via their Notes client, the dialog box should return the appropriate information to them.

help!! what's wrong with my page !!!

03-29

---------------------------------------------------------------------------------------------------rn-- (sql)rn---------------------------------------------------------------------------------------------------rnFUNCTION f_BumonmeiSel (rn i_KaikeiCen_c IN VARCHAR2 rn ,i_bumoncd IN VARCHAR2 rn ,o_bupinmei OUT VARCHAR2 rn ,o_sts_code OUT NUMBER rn ,o_sts_err OUT VARCHAR2 rn) RETURN NUMBERrnISrn ret NUMBER := 0;rn debug_path VARCHAR2(50) := '/tmp';rn sqler_file VARCHAR2(50) := 'sqlerr.log';rn BEGINrn o_sts_code := 0;rn o_sts_err := NULL;rn SELECT rn namern INTO rn o_bupinmeirn FROMrn namern WHERE trim(centcd) = i_KaikeiCen_crn AND trim(code) = i_bumoncd ;rn ret := CM.CRNORMAL;rn RETURN ret;rnEXCEPTIONrn WHEN OTHERS THENrn CMDBAC.p_ErrCatch('GI221700','f_BumonmeiSel');rn CMLGPT.p_DbErrPut('GI221700','f_BumonmeiSel','name select',NULL);rn o_sts_code := SQLCODE;rn o_sts_err := SQLERRM;rn CMDBAC.p_DebugPrt('GI221700.f_BumonmeiSel',SUBSTR(TO_CHAR(SQLCODE)||''|| SQLERRM,1,256),rn debug_path,sqler_file);rn RETURN CM.CRERROR;rnEND f_BumonmeiSel;rn---------------------------------------------------------------------------------------------------rn-- (java)rn--------------------------------------------------------------------------------------------------- rn private String getBumonmeiSel( CmFrHdl frhdl, String centcd, String bumoncd ) throws CmExceptionrn rn CmDboj frhdlwork = new CmDboj(); rn String name = ""; rn frhdlwork.setAPIName( "callStdFunc" ); rn frhdlwork.setReturnType( CM_C_DB_NUMBER );rn frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_IN_PARA, centcd );rn frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_IN_PARA, bumoncd );rn int outp1 = frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_OUT_PARA );rn int osts1 = frhdlwork.addParameterList( CM_C_DB_NUMBER, CM_C_DB_OUT_PARA );rn int osts2 = frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_OUT_PARA );rn raiseEvent(frhdl,getClass().getName(),"f_BumonmeiSel", frhdlwork);rn name = String.valueOf(frhdlwork.getParameter(outp1)); rn if ( name == null )rn rn name = "";rn rn return name ;rn rn

What's wrong whith my test graphing usercontrol's code?

04-30

下面是我新做的一个用VB编的测试用的控件的原代码, 其编译、运行时都没有显示任何问题,但当我将其运行之后,在其缺省状态下,即IE浏览器条件下打印该图形时,却显示出如下错误,rnrun-time error '6'rnoverflowrnUserControl.CurrentX = (UserControl.ScaleWidth - UserControl.TextWidth(该行代码在 paint事件中) rn请各位高手给予指导!rnrnrnrn************************************************************************rnConst m_def_Title = "test"rnDim m_Title As StringrnrnDim plotdata() As Doublern'Event Declarations:rnrnrnrnrn'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!rn'MemberInfo=13,0,0,testrnPublic Property Get Title() As Stringrn Title = m_TitlernEnd PropertyrnrnPublic Property Let Title(ByVal New_Title As String)rn m_Title = New_Titlern PropertyChanged "Title"rnEnd Propertyrnrn'Initialize Properties for User ControlrnPrivate Sub UserControl_InitProperties()rn m_Title = m_def_Titlern rn rnEnd SubrnrnPrivate Sub UserControl_Paint()rn rnDim i As IntegerrnDim j As IntegerrnrnUserControl.CurrentY = 200rnUserControl.CurrentX = (UserControl.ScaleWidth - UserControl.TextWidth(m_Title)) / 2rn'print TitlernUserControl.Print m_Titlern' darw a linernUserControl.Line -(ScaleWidth / 2, 1000)rnrnrnEnd Subrnrn'Load property values from storagernPrivate Sub UserControl_ReadProperties(PropBag As PropertyBag)rnrn m_Title = PropBag.ReadProperty("Title", m_def_Title)rnEnd SubrnrnPrivate Sub UserControl_Resize()rn Dim i As Integerrn Dim j As Integerrnrn UserControl.CurrentY = 200rn UserControl.CurrentX = (UserControl.ScaleWidth - UserControl.TextWidth(m_Title)) / 2rn 'print Titlern UserControl.Print m_Titlern ' darw a linern UserControl.Line -(ScaleWidth / 2, 1000)rnEnd Subrnrn'Write property values to storagernPrivate Sub UserControl_WriteProperties(PropBag As PropertyBag)rnrn Call PropBag.WriteProperty("Title", m_Title, m_def_Title)rnEnd Subrn'rnrnrn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭