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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DBReader/SAPKernel/SAPProxyAPKAPP
- Type classes in Scala
- DBReader/SAPKernel/RFC_DB_FLDAPK
- DBReader/SAPKernel/RFC_DB_OPTAPK
- DBReader/SAPKernel/RFC_DB_FLDTableAPK
- DBReader/SAPKernel/SAPProxy.resxAPKAPP
- DBReader/SAPKernel/TAB512APK
- 761637-Logon restrictions prevent TMSADM logonGoREST
- DBReader/SAPKernel/RFC_DB_OPTTableAPK
- DBReader/SAPKernel/TAB512TableAPK
- 3 About Kernels and Traits ClassesAI
- Linux_java_呼叫classesLinuxJava
- logon觸發器for dbaGo觸發器
- How to audit failed logon attemptsAIGo
- logon_triggerGo
- zt_Failed Logon AttemptsAIGo
- PostgreSQL DBA(46) - PG Operator classes and familiesSQL
- [ES6深度解析]12:Classes
- Python “黑魔法” 之 Meta ClassesPython
- Cannot complete applications logonAPPGo
- Go for PHP Developers: Structs vs Classes (翻譯)GoPHPDeveloperStruct
- Function 與 Classes 元件的區別在哪?Function元件
- lecture8 Template Classes + Const Correctness
- Oracle logon trigger舉例OracleGo
- tc39 proposal: Classes private methods and getter/setters
- Python高階特性(3): Classes和MetaclassesPython
- ojdbc14.jar 與 classes12.jarJDBCJAR
- LESS巢狀中的Mixins和classes巢狀
- ORACLE等待事件型別【Classes of Wait Events】Oracle事件型別AI
- [ORACLE 11G]Failed Logon Delays特性OracleAIGo
- Structs vs classes(值型別vs引用型別)Struct型別
- Python3.4 Tutorial9 - Classes (Part 3)Python
- Python3.4 Tutorial9 - Classes (Part 4)Python
- Python3.4 Tutorial9 - Classes (Part 2)Python
- Python3.4 Tutorial9 - Classes (Part 1)Python
- 找不到WEB-INF/classes/jive_init.propertiesWeb
- 全面學習ORACLE Scheduler特性(11)使用Job ClassesOracle
- 深入理解 Java17 新特性:Sealed ClassesJava