Collapse All Expand All Language Filter: Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: J# Code: JScript

EDKB12WS Reference
clsApplikation.SelectOne Method
See Also

Namespace: EDKB12WS.edokadb
Assembly: EDKB12WS (in EDKB12WS.exe)

# Syntax

Visual Basic
Public Overrides Function SelectOne() As DataTable
C#
public override DataTable SelectOne()
C++
public: DataTable^ SelectOne()
JScript
public function SelectOne() : DataTable;

# Source code

Visual Basic | Copy Code
Overrides Public Function SelectOne() As DataTable Dim scmCmdToExecute As SqlCommand = New SqlCommand() scmCmdToExecute.CommandText = "dbo.[pr_applikation_SelectOne]" scmCmdToExecute.CommandType = CommandType.StoredProcedure Dim dtToReturn As DataTable = new DataTable("applikation") Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute) ' // Use base class' connection object scmCmdToExecute.Connection = m_scoMainConnection Try scmCmdToExecute.Parameters.Add(new SqlParameter("@iapplikationsnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationsnr)) scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode)) If m_bMainConnectionIsCreatedLocal Then ' // Open connection. m_scoMainConnection.Open() Else If m_cpMainConnectionProvider.bIsTransactionPending Then scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction End If End If ' // Execute query. sdaAdapter.Fill(dtToReturn) m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32)) If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then ' // Throw error. Throw New Exception("Stored Procedure 'pr_applikation_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString()) End If If dtToReturn.Rows.Count > 0 Then m_iApplikationsnr = New SqlInt32(CType(dtToReturn.Rows(0)("applikationsnr"), Integer)) If dtToReturn.Rows(0)("version") Is System.DBNull.Value Then m_sVersion = SqlString.Null Else m_sVersion = New SqlString(CType(dtToReturn.Rows(0)("version"), String)) End If If dtToReturn.Rows(0)("dokument_server") Is System.DBNull.Value Then m_sDokument_server = SqlString.Null Else m_sDokument_server = New SqlString(CType(dtToReturn.Rows(0)("dokument_server"), String)) End If If dtToReturn.Rows(0)("net_use") Is System.DBNull.Value Then m_bNet_use = SqlBoolean.Null Else m_bNet_use = New SqlBoolean(CType(dtToReturn.Rows(0)("net_use"), Boolean)) End If If dtToReturn.Rows(0)("logisches_laufwerk") Is System.DBNull.Value Then m_sLogisches_laufwerk = SqlString.Null Else m_sLogisches_laufwerk = New SqlString(CType(dtToReturn.Rows(0)("logisches_laufwerk"), String)) End If If dtToReturn.Rows(0)("pfad_dokumente") Is System.DBNull.Value Then m_sPfad_dokumente = SqlString.Null Else m_sPfad_dokumente = New SqlString(CType(dtToReturn.Rows(0)("pfad_dokumente"), String)) End If If dtToReturn.Rows(0)("pfad_word_vorlagen") Is System.DBNull.Value Then m_sPfad_word_vorlagen = SqlString.Null Else m_sPfad_word_vorlagen = New SqlString(CType(dtToReturn.Rows(0)("pfad_word_vorlagen"), String)) End If If dtToReturn.Rows(0)("pfad_excel_vorlagen") Is System.DBNull.Value Then m_sPfad_excel_vorlagen = SqlString.Null Else m_sPfad_excel_vorlagen = New SqlString(CType(dtToReturn.Rows(0)("pfad_excel_vorlagen"), String)) End If If dtToReturn.Rows(0)("pfad_temporaer_dokumente") Is System.DBNull.Value Then m_sPfad_temporaer_dokumente = SqlString.Null Else m_sPfad_temporaer_dokumente = New SqlString(CType(dtToReturn.Rows(0)("pfad_temporaer_dokumente"), String)) End If If dtToReturn.Rows(0)("user_fileserver") Is System.DBNull.Value Then m_sUser_fileserver = SqlString.Null Else m_sUser_fileserver = New SqlString(CType(dtToReturn.Rows(0)("user_fileserver"), String)) End If If dtToReturn.Rows(0)("passwort_fileserver") Is System.DBNull.Value Then m_sPasswort_fileserver = SqlString.Null Else m_sPasswort_fileserver = New SqlString(CType(dtToReturn.Rows(0)("passwort_fileserver"), String)) End If If dtToReturn.Rows(0)("passwort_wordvorlagen") Is System.DBNull.Value Then m_sPasswort_wordvorlagen = SqlString.Null Else m_sPasswort_wordvorlagen = New SqlString(CType(dtToReturn.Rows(0)("passwort_wordvorlagen"), String)) End If If dtToReturn.Rows(0)("passwort_excelvorlagen") Is System.DBNull.Value Then m_sPasswort_excelvorlagen = SqlString.Null Else m_sPasswort_excelvorlagen = New SqlString(CType(dtToReturn.Rows(0)("passwort_excelvorlagen"), String)) End If If dtToReturn.Rows(0)("report_db") Is System.DBNull.Value Then m_sReport_db = SqlString.Null Else m_sReport_db = New SqlString(CType(dtToReturn.Rows(0)("report_db"), String)) End If If dtToReturn.Rows(0)("report_server") Is System.DBNull.Value Then m_sReport_server = SqlString.Null Else m_sReport_server = New SqlString(CType(dtToReturn.Rows(0)("report_server"), String)) End If If dtToReturn.Rows(0)("pfad_reportdateien") Is System.DBNull.Value Then m_sPfad_reportdateien = SqlString.Null Else m_sPfad_reportdateien = New SqlString(CType(dtToReturn.Rows(0)("pfad_reportdateien"), String)) End If If dtToReturn.Rows(0)("user_report") Is System.DBNull.Value Then m_sUser_report = SqlString.Null Else m_sUser_report = New SqlString(CType(dtToReturn.Rows(0)("user_report"), String)) End If If dtToReturn.Rows(0)("passwort_report") Is System.DBNull.Value Then m_sPasswort_report = SqlString.Null Else m_sPasswort_report = New SqlString(CType(dtToReturn.Rows(0)("passwort_report"), String)) End If If dtToReturn.Rows(0)("barcode_font") Is System.DBNull.Value Then m_sBarcode_font = SqlString.Null Else m_sBarcode_font = New SqlString(CType(dtToReturn.Rows(0)("barcode_font"), String)) End If If dtToReturn.Rows(0)("bcfont_groesse") Is System.DBNull.Value Then m_iBcfont_groesse = SqlInt32.Null Else m_iBcfont_groesse = New SqlInt32(CType(dtToReturn.Rows(0)("bcfont_groesse"), Integer)) End If If dtToReturn.Rows(0)("mailadresse") Is System.DBNull.Value Then m_sMailadresse = SqlString.Null Else m_sMailadresse = New SqlString(CType(dtToReturn.Rows(0)("mailadresse"), String)) End If If dtToReturn.Rows(0)("showlogin") Is System.DBNull.Value Then m_bShowlogin = SqlBoolean.Null Else m_bShowlogin = New SqlBoolean(CType(dtToReturn.Rows(0)("showlogin"), Boolean)) End If If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then m_iMandantnr = SqlInt32.Null Else m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer)) End If If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then m_bAktiv = SqlBoolean.Null Else m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean)) End If If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then m_daErstellt_am = SqlDateTime.Null Else m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date)) End If If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then m_daMutiert_am = SqlDateTime.Null Else m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date)) End If If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then m_iMutierer = SqlInt32.Null Else m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer)) End If If dtToReturn.Rows(0)("letzter_cold_run") Is System.DBNull.Value Then m_daLetzter_cold_run = SqlDateTime.Null Else m_daLetzter_cold_run = New SqlDateTime(CType(dtToReturn.Rows(0)("letzter_cold_run"), Date)) End If If dtToReturn.Rows(0)("letzer_ams_run") Is System.DBNull.Value Then m_daLetzer_ams_run = SqlDateTime.Null Else m_daLetzer_ams_run = New SqlDateTime(CType(dtToReturn.Rows(0)("letzer_ams_run"), Date)) End If If dtToReturn.Rows(0)("letzter_rdm_run") Is System.DBNull.Value Then m_daLetzter_rdm_run = SqlDateTime.Null Else m_daLetzter_rdm_run = New SqlDateTime(CType(dtToReturn.Rows(0)("letzter_rdm_run"), Date)) End If If dtToReturn.Rows(0)("letzter_host_run") Is System.DBNull.Value Then m_daLetzter_host_run = SqlDateTime.Null Else m_daLetzter_host_run = New SqlDateTime(CType(dtToReturn.Rows(0)("letzter_host_run"), Date)) End If If dtToReturn.Rows(0)("rdmstunden") Is System.DBNull.Value Then m_iRdmstunden = SqlInt32.Null Else m_iRdmstunden = New SqlInt32(CType(dtToReturn.Rows(0)("rdmstunden"), Integer)) End If If dtToReturn.Rows(0)("coldstunden") Is System.DBNull.Value Then m_iColdstunden = SqlInt32.Null Else m_iColdstunden = New SqlInt32(CType(dtToReturn.Rows(0)("coldstunden"), Integer)) End If If dtToReturn.Rows(0)("amsstunden") Is System.DBNull.Value Then m_iAmsstunden = SqlInt32.Null Else m_iAmsstunden = New SqlInt32(CType(dtToReturn.Rows(0)("amsstunden"), Integer)) End If If dtToReturn.Rows(0)("hoststunden") Is System.DBNull.Value Then m_iHoststunden = SqlInt32.Null Else m_iHoststunden = New SqlInt32(CType(dtToReturn.Rows(0)("hoststunden"), Integer)) End If If dtToReturn.Rows(0)("coldsystem") Is System.DBNull.Value Then m_sColdsystem = SqlString.Null Else m_sColdsystem = New SqlString(CType(dtToReturn.Rows(0)("coldsystem"), String)) End If If dtToReturn.Rows(0)("colduser") Is System.DBNull.Value Then m_sColduser = SqlString.Null Else m_sColduser = New SqlString(CType(dtToReturn.Rows(0)("colduser"), String)) End If If dtToReturn.Rows(0)("coldpassword") Is System.DBNull.Value Then m_sColdpassword = SqlString.Null Else m_sColdpassword = New SqlString(CType(dtToReturn.Rows(0)("coldpassword"), String)) End If If dtToReturn.Rows(0)("coldgui") Is System.DBNull.Value Then m_sColdgui = SqlString.Null Else m_sColdgui = New SqlString(CType(dtToReturn.Rows(0)("coldgui"), String)) End If If dtToReturn.Rows(0)("Passwort_vorlagenverwaltung") Is System.DBNull.Value Then m_sPasswort_vorlagenverwaltung = SqlString.Null Else m_sPasswort_vorlagenverwaltung = New SqlString(CType(dtToReturn.Rows(0)("Passwort_vorlagenverwaltung"), String)) End If If dtToReturn.Rows(0)("Anzahl_Cold_Viewer") Is System.DBNull.Value Then m_iAnzahl_Cold_Viewer = SqlInt32.Null Else m_iAnzahl_Cold_Viewer = New SqlInt32(CType(dtToReturn.Rows(0)("Anzahl_Cold_Viewer"), Integer)) End If If dtToReturn.Rows(0)("Zeitintervall_in_Minuten") Is System.DBNull.Value Then m_iZeitintervall_in_Minuten = SqlInt32.Null Else m_iZeitintervall_in_Minuten = New SqlInt32(CType(dtToReturn.Rows(0)("Zeitintervall_in_Minuten"), Integer)) End If If dtToReturn.Rows(0)("coldstart") Is System.DBNull.Value Then m_sColdstart = SqlString.Null Else m_sColdstart = New SqlString(CType(dtToReturn.Rows(0)("coldstart"), String)) End If If dtToReturn.Rows(0)("videomenu") Is System.DBNull.Value Then m_sVideomenu = SqlString.Null Else m_sVideomenu = New SqlString(CType(dtToReturn.Rows(0)("videomenu"), String)) End If '20071120 RGL Cutover Avaloq Anbindung If dtToReturn.Rows(0)("Cutoverdate") Is System.DBNull.Value Then m_cutoverdate = SqlDateTime.Null Else m_cutoverdate = New SqlDateTime(CType(dtToReturn.Rows(0)("Cutoverdate"), Date)) End If End If Return dtToReturn Catch ex As Exception MsgBox(ex.Message) ' // some error occured. Bubble it to caller and encapsulate Exception object Throw New Exception("clsApplikation::SelectOne::Error occured.", ex) Finally If m_bMainConnectionIsCreatedLocal Then ' // Close connection. m_scoMainConnection.Close() End If scmCmdToExecute.Dispose() sdaAdapter.Dispose() End Try End Function

# Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2 The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

# Version Information

## .NET Framework Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0 ## .NET Compact Framework Supported in: 3.5, 2.0, 1.0 ## XNA Framework Supported in: 3.0, 2.0, 1.0

# See Also

## Reference clsApplikation Class clsApplikation clsApplikation Members EDKB12WS.edokadb Namespace