|
hi liste. ich habe folgende
stored-procedure:
CREATE PROCEDURE thema_insert
@thema Char(200), @nummer Int, @online
Bit
AS
INSERT INTO thema VALUES(@thema,@nummer,@online) GO die rufe ich mit folgender funktion
auf:
Function insertThema(ByVal thema As String, ByVal
nummer As Integer, ByVal online As Boolean) As
Integer
Try Dim strProcedure As String Dim MyParam As SqlParameter
strProcedure = "thema_Insert"
Dim
objConnect As New SqlConnection(Me.connString)
Dim
objCommand As New SqlCommand(strProcedure,objConnect)
objCommand.CommandType = CommandType.StoredProcedure
MyParam = objCommand.Parameters.Add("@thema", SqlDbType.VarChar,200) MyParam.Value = thema MyParam
= objCommand.Parameters.Add("@nummer",
SqlDbType.Int)
MyParam.Value = nummer MyParam
= objCommand.Parameters.Add("@online",
SqlDbType.Bit)
MyParam.Value = online
objConnect.Open()
objCommand.ExecuteNonQuery() objConnect.Close() return
0
Catch ex As exception return 1 End Try End Function wie muss ich das ganze denn umschreiben, damit ich die neu erzeugte id
zur�ckgeliefert bekomme ???
|
- Re: [Asp.net] neue id zur�ckbekommen Thomas Beckert
- Re: [Asp.net] neue id zur�ckbekommen Christoph Schmid
- [Asp.net] Re: [Asp.net] neue id zur�ckbekommen Thomas Beckert
- Re: [Asp.net] Re: [Asp.net] neue id zur?ckbe... Christoph Schmid
- [Asp.net] Re: [Asp.net] Re: [Asp.net] ne... Thomas Beckert
- [Asp.net] Re: [Asp.net] Re: [Asp.ne... Christoph Schmid
- [Asp.net] Re: [Asp.net] Re: [As... Christoph Schmid
- [Asp.net] Re: [Asp.net] neu... Thomas Beckert
