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

EDKB12WS Reference
clsMyPartner.search_partner Method
See Also

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

# Syntax

Visual Basic
Public Function search_partner( _ ByVal query As String, _ ByVal anzahl As String, _ ByVal fnkt As Integer _ ) As DataTable
C#
public DataTable search_partner( string query, string anzahl, int fnkt )
C++
public: DataTable^ search_partner( String^ query, String^ anzahl, int fnkt )
JScript
public function search_partner( query : String, anzahl : String, fnkt : int ) : DataTable;
## Parameters query anzahl fnkt

# Source code

Visual Basic | Copy Code
Public Function search_partner(ByVal query As String, ByVal anzahl As String, ByVal fnkt As Integer) As DataTable Dim scmCmdToExecute As SqlCommand = New SqlCommand() Dim table As String = "dbo.partner" scmCmdToExecute.CommandText = "dbo.[sp_partner_search]" scmCmdToExecute.CommandType = CommandType.StoredProcedure Dim dtToReturn As DataTable = New DataTable("partner") Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute) ' // Use base class' connection object scmCmdToExecute.Connection = conn.scoDBConnection Try scmCmdToExecute.Parameters.Add(New SqlParameter("@query", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, query)) scmCmdToExecute.Parameters.Add(New SqlParameter("@table", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, table)) scmCmdToExecute.Parameters.Add(New SqlParameter("@anz", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, anzahl)) scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, fnkt)) scmCmdToExecute.Connection.Open() sdaAdapter.Fill(dtToReturn) Return dtToReturn Catch ex As Exception ' // some error occured. Bubble it to caller and encapsulate Exception object Throw New Exception("clsMyPartner::sp_partner_search::Error occured." + ex.Message, ex) Finally scmCmdToExecute.Connection.Close() 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 clsMyPartner Class clsMyPartner clsMyPartner Members EDKB12WS.edokadb Namespace