DBReader/Classes/Logon
/**
*
* DBReader 1.0, Access to SAP tables using SAP's .Net Connector.
*
* Author: hardteck
* Email:
*
* Last modified: Fr, 17. Okt 2003, 11:31:32
*/
namespace SAPReader {
using System;
///
/// The Logon encapsulates the SAPLogon.
///
///
public class Logon : SAP.Connector.SAPLogonDestination {
///
/// The Constructor.
///
public Logon(){}
///
/// Given the name of an SAP System, this method returns
/// the corresponding destination object.
///
///
/// Name of the SAP System as displayed in the list
/// of available destinations.
///
///
public SAP.Connector.Destination getDestinationByName(string name){
// Map the name used for displaying the available destination,
// e.g. at SAPLogon, to the internal name used to address this item.
// BTW, the internal name (key) is derived from saplogon.ini.
string destName = this.GetDestinationNameFromPrintName(name);
// null returned if the destination does not exist.
if(destName == null || destName == "" ){
Console.WriteLine(this.GetType().ToString()
+ ".getDestinationByName: Destination " + name + " does not exist."
);
Console.WriteLine("Available Destinations are: ");
this.printAvailableDestinations(Console.Out);
Environment.Exit(0);
}
// This is the key statement for selecting the desired destination item:
this.DestinationName = destName;
// Now all information is retrieved from the SAPLogon's ini file
// to the respective variables of 'this' destination object.
// (The ini file is stored in the private variable:
// SAP.Connector.SAPLogonDestination.saplogon.fileName)
return (SAP.Connector.Destination)this;
}
///
/// Writes a list of available destinations to a stream.
///
/// Stream to write to.
public void printAvailableDestinations(System.IO.TextWriter txtWriter){
foreach(System.Collections.DictionaryEntry dest in this.AvailableDestinations){
txtWriter.WriteLine(dest.Value.ToString());
}
}
}
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/232040/viewspace-968998/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- logon觸發器for dbaGo觸發器
- secondary logon服務怎麼開啟?Win10系統secondary logon服務的開啟步驟GoWin10
- [20211014]19C Failed Logon Delay.txtAIGo
- lecture8 Template Classes + Const Correctness
- PostgreSQL DBA(46) - PG Operator classes and familiesSQL
- [ES6深度解析]12:Classes
- Function 與 Classes 元件的區別在哪?Function元件
- tc39 proposal: Classes static fields and methods
- Go for PHP Developers: Structs vs Classes (翻譯)GoPHPDeveloperStruct
- Android: The following classes could not be instantiated: 解決方法Android
- tc39 proposal: Classes private methods and getter/setters
- sqlplus / as sysdba報錯ORA-01017: invalid username/password; logon deniedSQLGo
- NotImplementedError: Only the following pseudo-classes are implemented: nth-of-type.Error
- 深入理解 Java17 新特性:Sealed ClassesJava
- oracle 19c sec_case_sensitive_logon引數問題OracleGo
- Win10系統怎麼開啟secondary logon服務Win10Go
- 一個基於 SourceGenerator 生成 從 dbReader轉換為 class 資料的效能測試實驗
- 翻譯:《實用的Python程式設計》05_02_Classes_encapsulationPython程式設計
- BUG記錄-Sharing is only supported for boot loader classes because bootstrap classpath has been appendebootAPP
- IntelliJIDEA中看到classes,sources,javadocs三種jar的區別和各自的作用IntelliJIdeaJavaJAR
- Windows Secondary Logon服務中的一個控制程式碼許可權洩露BugWindowsGo
- Java Nested Classes(內部類~第一篇英文技術文件翻譯)Java
- Zero-shot Learning零樣本學習 論文閱讀(一)——Learning to detect unseen object classes by between-class attributeObject