2010年3月27日 星期六

oo4o OraParameter Object 補oracle help 不足 、Oracle RDBMS 使用

oo4o OraParameter Object 補oracle help 不足 、Oracle RDBMS 使用。

■バインド変数

  ・バインド変数を使用した更新を行う事ができる。
    Oracle サーバ上のキャッシュ SQL が利用できるので高速になる。

■OraParameter Object 使用

  ・Parameters.Add 新增參數。
    ServerType 設定方式。(OraParameter)

  OraDatabase.Parameters.Add "變數名稱", 0, ORAPARM_INPUT
                             變數初始值 _|        |
                             輸入 ORAPARM_INPUT  _|
                             輸出 ORAPARM_OUTPUT
                             I/O  ORAPARM_BOTH

  OraDatabase.Parameters("變數名稱").ServerType = ORATYPE_CHAR
                                      ORATYPE_VARCHAR2 _|
                                      ORATYPE_NUMBER
                                      ORATYPE_SINT
                                      ORATYPE_FLOAT
                                      ORATYPE_STRING
                                      ORATYPE_VARCHAR
                                      ORATYPE_DATE
                                      ORATYPE_UINT
                                      ORATYPE_CHAR
                                      ORATYPE_CHARZ
                                      ORATYPE_CURSOR

  ・Value 取得方式。

  OraDatabase.Parameters("變數名稱").Value = "a001"

  ・Parameters.Remove 變數移除方式。

  OraDatabase.Parameters.Remove "變數名稱"

轉載網站:http://homepage2.nifty.com/sak/w_sak3/doc/sysbrd/vb_s24.htm

2010年3月17日 星期三

Lotus Notes 連接oracle的另一種想法

想法透過 Oracle Objects for OLE 的方式進行連接Oracle 資料庫,正在測試中:
Example:
Q:
What do I need on my R5.0.12 domino server to make a connection to an Oracle 8.x server?

I would like to do this using Java or LotusScript directly to the Oracle database (No DSN).
Thanks,
-Lance

Ans:

RE: Making a connection to Oracle
Posted by Siddharth Gupta on 5.May.03 at 上午 09:17 using a Web browser
Category: Lotus ConnectorsRelease: Lotus Connectors - All ReleasesPlatform: Windows 2000


You need oracle objects for ole to do this. Basically if you have an Oracle client installed on your machine then you will have this.

You will need to instatioate the oracle sessions by a code similar to this:


 
  Set OraSession = CreateObject("OracleInProcServer.XOraSession")
'Get the OraClient object.
Set OraClient = OraSession.Client
'Create a named OraSession Object. Alternatively, you could use the CreateNamedSession method of the OraSession Object.
Set NamedOraSession = OraClient.CreateSession("Anyname")
'Create the OraDatabase Object by opening a connection to Oracle.
Set OraDatabase = NamedOraSession.OpenDatabase(DbName,Username,Password)




資料來源:Enterprise Integration Forum
/****************************************/
2010/3/18 下午測試成功,範例如下:
/***************************************/
 
Sub Postopen(Source As Notesuidocument)
    Dim OraSession As Variant
    Dim ODatabase As Variant
    Dim ODynaset As Variant
   
    Set OraSession = CreateObject("OracleInProcServer.XOraSession")
     'Get the OraClient object.
    Set OraClient = OraSession.Client
     'Create a named OraSession Object. Alternatively, you could use the CreateNamedSession method of the OraSession Object.
    Set OraSession = OraClient.CreateSession("FIAC")
     'Create the OraDatabase Object by opening a connection to Oracle.
    Set OraDatabase = OraSession.OpenDatabase("FIAC","fiac/fiac",0&)
   
    If (OraDatabase Is Nothing ) Then
        Messagebox "ORACLE Connect Error"
        Exit Sub
       
    End If
    Set ODynaset=OraDatabase.CreateDynaset("select * from figc",0&)
    Msgbox ODynaset.fields("ComLab").value
       '取得Oracle 資料
    Call source.FieldSetText("ComLab", ODynaset.fields("ComLab").value )
    ODynaset.close
    OraDatabase.close
End Sub




2010年1月12日 星期二

UPS不斷電安全值方式含範例

一般不斷電系統容量規劃是依使用產品最大功率為計算單位,例如一般電腦300W為固定使用最大功率(300W為最大輸出功率),如果以不斷電系統1000VA為例 (1000VA乘以60%為瓦特計算) 600W

一般不斷電系統容量計算都是以60%為瓦特數計算

要怎麼抓這個安全值?

一般性資訊產品都是有瓦特之計算標準,如果你接一台1000VA不斷電系統UPS大約有600瓦特安全負載,所謂全載 :就是600瓦特
---------------------------------------------------------------------------------------
飛瑞的規格有寫說
C-3000
額定3KVA
供電時間 :
全載 : 5分鐘 (2100W)
半載 : 15分鐘 (1050W)
全載 : 是以(3000VA乘以70%為瓦特計算)=2100W計算,也就是可以接300W的電腦7台,就是滿載可以支持5分鐘,如果接8台300W的電腦就是過載,一斷電就會全掛,無法支撐.
半載 :可以接300W的電腦3台加一台150W的螢幕,共1050W,斷電可以支持15分鐘.


一般不斷電系統容量計算都是以60%為瓦特數計算
飛瑞的規格不斷電系統容量計算都是以70%為瓦特數計算
------------------------------------------------------------------
如果一台設備有2台電源供應器
那是不是把2台電源供應器的功率加起來?

ans:是的
------------------------------------------------------------------

看了說明
不太懂那個電池的說明
因為有直流電壓 96V

ans: 因為有直流電壓 96V / 電池型 式 12V (密閉式免維護) 96除以 12 = 8 飛瑞C-3000 的 UPS 有 8 顆密閉式免維護電池
12V電池8個串起來總共有96V
轉至yahoo知識+