You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
6.5 KiB
136 lines
6.5 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML xmlns:MSHelp="http://msdn.microsoft.com/mshelp" DIR="LTR"><HEAD>
|
|
<meta name="GENERATOR" content="VBdocman .NET - documentation generator; http://www.vbdocman.com">
|
|
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=UTF-8">
|
|
<TITLE>clsMyKey_Tabelle.get_dbkey -Methode</TITLE>
|
|
<xml>
|
|
<MSHelp:TOCTitle Title="clsMyKey_Tabelle.get_dbkey -Methode"/>
|
|
<MSHelp:RLTitle Title="clsMyKey_Tabelle.get_dbkey -Methode"/>
|
|
<MSHelp:Keyword Index="A" Term="topic_0000000000000543"/>
|
|
<MSHelp:Keyword Index="K" Term="clsMyKey_Tabelle.get_dbkey -Methode"/>
|
|
<MSHelp:Keyword Index="K" Term="Vertragsverwaltung.TKB.VV.DB.clsMyKey_Tabelle.get_dbkey -Methode"/>
|
|
<MSHelp:Keyword Index="F" Term="Vertragsverwaltung.TKB.VV.DB.clsMyKey_Tabelle.get_dbkey"/>
|
|
<MSHelp:Keyword Index="F" Term="clsMyKey_Tabelle.get_dbkey"/>
|
|
<MSHelp:Keyword Index="F" Term="Vertragsverwaltung.TKB.VV.DB.clsMyKey_Tabelle.clsMyKey_Tabelle.get_dbkey"/>
|
|
<MSHelp:Attr Name="DevLang" Value="VB"/>
|
|
<MSHelp:Attr Name="DevLangVers" Value="kbLangVB"/>
|
|
<MSHelp:Attr Name="DocSet" Value="Visual Basic"/>
|
|
<MSHelp:Attr Name="DocSet" Value="Visual Studio"/>
|
|
<MSHelp:Attr Name="DocSet" Value="VSM"/>
|
|
<MSHelp:Attr Name="Product" Value="VB"/>
|
|
<MSHelp:Attr Name="ProductVers" Value="kbVBp700"/>
|
|
<MSHelp:Attr Name="Product" Value="VSA"/>
|
|
<MSHelp:Attr Name="ProductVers" Value="kbVSA"/>
|
|
<MSHelp:Attr Name="Technology" Value="ManagedCode"/>
|
|
<MSHelp:Attr Name="TechnologyVers" Value="kbManagedCode"/>
|
|
<MSHelp:Attr Name="TopicType" Value="kbSyntax"/>
|
|
<MSHelp:Attr Name="TargetOS" Value="Windows"/>
|
|
<MSHelp:Attr Name="Locale" Value="kbEnglish"/>
|
|
</xml>
|
|
<META name="rtfFileName" content="">
|
|
<META NAME="save" CONTENT="history">
|
|
<!--CSS_START-->
|
|
<SCRIPT SRC="MSHelp/scripts/dtuelink.js"></SCRIPT>
|
|
<!--CSS_END-->
|
|
<SCRIPT language="JavaScript">
|
|
function indent(level) {
|
|
for (i=1; i<=level; i++) {
|
|
document.write(" ");
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
</HEAD>
|
|
<body topmargin=0 id="bodyID" class = "dtBODY"><!--NONSCROLLING BANNER START-->
|
|
<div id="nsbanner">
|
|
<div id="bannerrow1">
|
|
<TABLE CLASS="bannerparthead" CELLSPACING=0>
|
|
<TR ID="hdr">
|
|
<TD CLASS="runninghead" nowrap>Vertragsverwaltung-Klassenbibliothek</TD>
|
|
<TD CLASS="product" nowrap> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</div>
|
|
<div id="TitleRow">
|
|
<H1 class="dtH1"><A NAME="topic_0000000000000543"></A>clsMyKey_Tabelle.get_dbkey -Methode</H1>
|
|
</div></div>
|
|
<!--NONSCROLLING BANNER END-->
|
|
|
|
<DIV id="nstext" valign="bottom"><!---->
|
|
|
|
|
|
|
|
|
|
|
|
<PRE class="syntax"><SPAN class="lang">[Visual Basic]
|
|
</SPAN><B>Public Function get_dbkey( _ <br> ByVal <i>Tablename</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a> _ <br>) As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemInt64ClassTopic.htm">Long</a></B></PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<H4 class="dtH4">Parameter</H4>
|
|
<dl>
|
|
<dt><i>Tablename</i></dt>
|
|
<dd></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<H4 class="dtH4">Quellcode</H4>
|
|
<pre class="code"><SPAN class="lang">[Visual Basic]</SPAN>
|
|
Public Function get_dbkey(ByVal Tablename As String) As Long <br> Dim m_dbkey As Long <br> Dim scmCmdToExecute As SqlCommand = New SqlCommand() <br> scmCmdToExecute.CommandText = "dbo.[sp_get_dbkey]" <br> scmCmdToExecute.CommandType = CommandType.StoredProcedure <br> ' // Use base class' connection object <br> scmCmdToExecute.Connection = m_scoMainConnection <br> Try <br> scmCmdToExecute.Parameters.Add(New SqlParameter("@Tablename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Tablename)) <br> scmCmdToExecute.Parameters.Add(New SqlParameter("@dbkey", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_dbkey)) <br> scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode)) <br> <br> If m_bMainConnectionIsCreatedLocal Then <br> ' // Open connection. <br> m_scoMainConnection.Open() <br> Else <br> If m_cpMainConnectionProvider.bIsTransactionPending Then <br> scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction <br> End If <br> End If <br> <br> ' // Execute query. <br> Try <br> scmCmdToExecute.Connection.Open() <br> Catch ex As Exception <br> Finally <br> End Try <br> <br> scmCmdToExecute.ExecuteNonQuery() <br> m_dbkey = scmCmdToExecute.Parameters.Item("@dbkey").Value <br> m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32)) <br> scmCmdToExecute.Connection.Close() <br> <br> If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then <br> ' // Throw error. <br> Throw New Exception("Stored Procedure 'sp_get_dbkey' reported the ErrorCode: " & m_iErrorCode.ToString()) <br> End If <br> <br> Return m_dbkey <br> Catch ex As Exception <br> ' // some error occured. Bubble it to caller and encapsulate Exception object <br> Throw New Exception("clsKey_tabelle::get_dbkey::Error occured." + ex.Message, ex) <br> Finally <br> If m_bMainConnectionIsCreatedLocal Then <br> ' // Close connection. <br> m_scoMainConnection.Close() <br> End If <br> scmCmdToExecute.Dispose() <br> End Try <br> End Function
|
|
</pre>
|
|
|
|
|
|
|
|
<H4 class="dtH4">Forderungen</H4>
|
|
<P><b class="le">Plattformen: </b>Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition</P>
|
|
|
|
|
|
<H4 class="dtH4">Siehe auch</H4>
|
|
<p>
|
|
<a href="topic_0000000000000542.html">clsMyKey_Tabelle</a>
|
|
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<DIV CLASS="footer">
|
|
<HR>
|
|
Generated by VBdocman .NET
|
|
<p>
|
|
</div></div>
|
|
</BODY>
|
|
</HTML>
|
|
|