-- ================================================================================================================ -- Stored Procedures generated by LLBLGen v1.21.2003.712 Final on Dienstag, 1. Januar 2013, 13:15:45 -- For the Low Level Business Logic Layer for the database 'themenmanagement' -- ================================================================================================================ SET NOCOUNT ON GO USE [themenmanagement] GO -- ======================================================================================================== -- [Stored Procedures generated for table: Application] GO -- //// Insert Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_Insert] GO --------------------------------------------------------------------------------- -- Stored procedure that will insert 1 row in the table 'Application' -- Gets: @iapplikationsnr int -- Gets: @sversion varchar(4) -- Gets: @bshowlogin bit -- Gets: @imandantnr int -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Gets: @stmp_filepath varchar(255) -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_Application_Insert] @iapplikationsnr int, @sversion varchar(4), @bshowlogin bit, @imandantnr int, @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @stmp_filepath varchar(255), @iErrorCode int OUTPUT AS SET NOCOUNT ON -- INSERT a new row in the table. INSERT [dbo].[Application] ( [applikationsnr], [version], [showlogin], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [tmp_filepath] ) VALUES ( @iapplikationsnr, @sversion, @bshowlogin, @imandantnr, @baktiv, @daerstellt_am, @damutiert_am, @imutierer, @stmp_filepath ) -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Update Stored procedure for updating one single row. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_Update] GO --------------------------------------------------------------------------------- -- Stored procedure that will update an existing row in the table 'Application' -- Gets: @iapplikationsnr int -- Gets: @sversion varchar(4) -- Gets: @bshowlogin bit -- Gets: @imandantnr int -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Gets: @stmp_filepath varchar(255) -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_Application_Update] @iapplikationsnr int, @sversion varchar(4), @bshowlogin bit, @imandantnr int, @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @stmp_filepath varchar(255), @iErrorCode int OUTPUT AS SET NOCOUNT ON -- UPDATE an existing row in the table. UPDATE [dbo].[Application] SET [version] = @sversion, [showlogin] = @bshowlogin, [mandantnr] = @imandantnr, [aktiv] = @baktiv, [erstellt_am] = @daerstellt_am, [mutiert_am] = @damutiert_am, [mutierer] = @imutierer, [tmp_filepath] = @stmp_filepath WHERE [applikationsnr] = @iapplikationsnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_Delete] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete an existing row from the table 'Application' -- using the Primary Key. -- Gets: @iapplikationsnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_Application_Delete] @iapplikationsnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE an existing row from the table. DELETE FROM [dbo].[Application] WHERE [applikationsnr] = @iapplikationsnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select Stored procedure, based on Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_SelectOne] GO --------------------------------------------------------------------------------- -- Stored procedure that will select an existing row from the table 'Application' -- based on the Primary Key. -- Gets: @iapplikationsnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_Application_SelectOne] @iapplikationsnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT an existing row from the table. SELECT [applikationsnr], [version], [showlogin], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [tmp_filepath] FROM [dbo].[Application] WHERE [applikationsnr] = @iapplikationsnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select All Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_SelectAll] GO --------------------------------------------------------------------------------- -- Stored procedure that will select all rows from the table 'Application' -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_Application_SelectAll] @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT all rows from the table. SELECT [applikationsnr], [version], [showlogin], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [tmp_filepath] FROM [dbo].[Application] ORDER BY [applikationsnr] ASC -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- [End of Stored Procedures for table: Application] -- ======================================================================================================== GO -- ======================================================================================================== -- [Stored Procedures generated for table: key_tabelle] GO -- //// Insert Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_key_tabelle_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_key_tabelle_Insert] GO --------------------------------------------------------------------------------- -- Stored procedure that will insert 1 row in the table 'key_tabelle' -- Gets: @sbeschreibung varchar(255) -- Gets: @ikey_wert int -- Gets: @imandantnr int -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Returns: @ikeynr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_key_tabelle_Insert] @sbeschreibung varchar(255), @ikey_wert int, @imandantnr int, @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @ikeynr int OUTPUT, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- INSERT a new row in the table. INSERT [dbo].[key_tabelle] ( [beschreibung], [key_wert], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer] ) VALUES ( @sbeschreibung, @ikey_wert, @imandantnr, @baktiv, @daerstellt_am, @damutiert_am, @imutierer ) -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR -- Get the IDENTITY value for the row just inserted. SELECT @ikeynr=SCOPE_IDENTITY() GO -- //// Update Stored procedure for updating one single row. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_key_tabelle_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_key_tabelle_Update] GO --------------------------------------------------------------------------------- -- Stored procedure that will update an existing row in the table 'key_tabelle' -- Gets: @ikeynr int -- Gets: @sbeschreibung varchar(255) -- Gets: @ikey_wert int -- Gets: @imandantnr int -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_key_tabelle_Update] @ikeynr int, @sbeschreibung varchar(255), @ikey_wert int, @imandantnr int, @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- UPDATE an existing row in the table. UPDATE [dbo].[key_tabelle] SET [beschreibung] = @sbeschreibung, [key_wert] = @ikey_wert, [mandantnr] = @imandantnr, [aktiv] = @baktiv, [erstellt_am] = @daerstellt_am, [mutiert_am] = @damutiert_am, [mutierer] = @imutierer WHERE [keynr] = @ikeynr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_key_tabelle_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_key_tabelle_Delete] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete an existing row from the table 'key_tabelle' -- using the Primary Key. -- Gets: @ikeynr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_key_tabelle_Delete] @ikeynr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE an existing row from the table. DELETE FROM [dbo].[key_tabelle] WHERE [keynr] = @ikeynr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select Stored procedure, based on Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_key_tabelle_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_key_tabelle_SelectOne] GO --------------------------------------------------------------------------------- -- Stored procedure that will select an existing row from the table 'key_tabelle' -- based on the Primary Key. -- Gets: @ikeynr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_key_tabelle_SelectOne] @ikeynr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT an existing row from the table. SELECT [keynr], [beschreibung], [key_wert], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer] FROM [dbo].[key_tabelle] WHERE [keynr] = @ikeynr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select All Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_key_tabelle_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_key_tabelle_SelectAll] GO --------------------------------------------------------------------------------- -- Stored procedure that will select all rows from the table 'key_tabelle' -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_key_tabelle_SelectAll] @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT all rows from the table. SELECT [keynr], [beschreibung], [key_wert], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer] FROM [dbo].[key_tabelle] ORDER BY [keynr] ASC -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- [End of Stored Procedures for table: key_tabelle] -- ======================================================================================================== GO -- ======================================================================================================== -- [Stored Procedures generated for table: meldungstexte] GO -- //// Insert Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_Insert] GO --------------------------------------------------------------------------------- -- Stored procedure that will insert 1 row in the table 'meldungstexte' -- Gets: @imeldungstextnr int -- Gets: @isprache int -- Gets: @sinhalt varchar(1024) -- Gets: @sBeschreibung varchar(255) -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Gets: @imandantnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_Insert] @imeldungstextnr int, @isprache int, @sinhalt varchar(1024), @sBeschreibung varchar(255), @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @imandantnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- INSERT a new row in the table. INSERT [dbo].[meldungstexte] ( [meldungstextnr], [sprache], [inhalt], [Beschreibung], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [mandantnr] ) VALUES ( @imeldungstextnr, @isprache, @sinhalt, @sBeschreibung, @baktiv, @daerstellt_am, @damutiert_am, @imutierer, @imandantnr ) -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Update Stored procedure for updating one single row. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_Update] GO --------------------------------------------------------------------------------- -- Stored procedure that will update an existing row in the table 'meldungstexte' -- Gets: @imeldungstextnr int -- Gets: @isprache int -- Gets: @sinhalt varchar(1024) -- Gets: @sBeschreibung varchar(255) -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Gets: @imandantnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_Update] @imeldungstextnr int, @isprache int, @sinhalt varchar(1024), @sBeschreibung varchar(255), @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @imandantnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- UPDATE an existing row in the table. UPDATE [dbo].[meldungstexte] SET [inhalt] = @sinhalt, [Beschreibung] = @sBeschreibung, [aktiv] = @baktiv, [erstellt_am] = @daerstellt_am, [mutiert_am] = @damutiert_am, [mutierer] = @imutierer, [mandantnr] = @imandantnr WHERE [meldungstextnr] = @imeldungstextnr AND [sprache] = @isprache -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_Delete] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete an existing row from the table 'meldungstexte' -- using the Primary Key. -- Gets: @imeldungstextnr int -- Gets: @isprache int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_Delete] @imeldungstextnr int, @isprache int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE an existing row from the table. DELETE FROM [dbo].[meldungstexte] WHERE [meldungstextnr] = @imeldungstextnr AND [sprache] = @isprache -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using PK field [meldungstextnr] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_DeleteAllWmeldungstextnrLogic]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_DeleteAllWmeldungstextnrLogic] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete one or more existing rows from the table 'meldungstexte' -- using the Primary Key field [meldungstextnr]. -- Gets: @imeldungstextnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_DeleteAllWmeldungstextnrLogic] @imeldungstextnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE one or more existing rows from the table. DELETE FROM [dbo].[meldungstexte] WHERE [meldungstextnr] = @imeldungstextnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using PK field [sprache] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_DeleteAllWspracheLogic]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_DeleteAllWspracheLogic] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete one or more existing rows from the table 'meldungstexte' -- using the Primary Key field [sprache]. -- Gets: @isprache int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_DeleteAllWspracheLogic] @isprache int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE one or more existing rows from the table. DELETE FROM [dbo].[meldungstexte] WHERE [sprache] = @isprache -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select Stored procedure, based on Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_SelectOne] GO --------------------------------------------------------------------------------- -- Stored procedure that will select an existing row from the table 'meldungstexte' -- based on the Primary Key. -- Gets: @imeldungstextnr int -- Gets: @isprache int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_SelectOne] @imeldungstextnr int, @isprache int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT an existing row from the table. SELECT [meldungstextnr], [sprache], [inhalt], [Beschreibung], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [mandantnr] FROM [dbo].[meldungstexte] WHERE [meldungstextnr] = @imeldungstextnr AND [sprache] = @isprache -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select All Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_meldungstexte_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_meldungstexte_SelectAll] GO --------------------------------------------------------------------------------- -- Stored procedure that will select all rows from the table 'meldungstexte' -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_meldungstexte_SelectAll] @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT all rows from the table. SELECT [meldungstextnr], [sprache], [inhalt], [Beschreibung], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [mandantnr] FROM [dbo].[meldungstexte] ORDER BY [meldungstextnr] ASC , [sprache] ASC -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- [End of Stored Procedures for table: meldungstexte] -- ======================================================================================================== GO -- ======================================================================================================== -- [Stored Procedures generated for table: mitarbeiter] GO -- //// Insert Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_mitarbeiter_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_mitarbeiter_Insert] GO --------------------------------------------------------------------------------- -- Stored procedure that will insert 1 row in the table 'mitarbeiter' -- Gets: @imitarbeiternr int -- Gets: @svorname varchar(50) -- Gets: @sname varchar(50) -- Gets: @stgnummer varchar(50) -- Gets: @semail varchar(50) -- Gets: @imandantnr int -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_mitarbeiter_Insert] @imitarbeiternr int, @svorname varchar(50), @sname varchar(50), @stgnummer varchar(50), @semail varchar(50), @imandantnr int, @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- INSERT a new row in the table. INSERT [dbo].[mitarbeiter] ( [mitarbeiternr], [vorname], [name], [tgnummer], [email], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer] ) VALUES ( @imitarbeiternr, @svorname, @sname, @stgnummer, @semail, @imandantnr, @baktiv, @daerstellt_am, @damutiert_am, @imutierer ) -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Update Stored procedure for updating one single row. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_mitarbeiter_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_mitarbeiter_Update] GO --------------------------------------------------------------------------------- -- Stored procedure that will update an existing row in the table 'mitarbeiter' -- Gets: @imitarbeiternr int -- Gets: @svorname varchar(50) -- Gets: @sname varchar(50) -- Gets: @stgnummer varchar(50) -- Gets: @semail varchar(50) -- Gets: @imandantnr int -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_mitarbeiter_Update] @imitarbeiternr int, @svorname varchar(50), @sname varchar(50), @stgnummer varchar(50), @semail varchar(50), @imandantnr int, @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- UPDATE an existing row in the table. UPDATE [dbo].[mitarbeiter] SET [vorname] = @svorname, [name] = @sname, [tgnummer] = @stgnummer, [email] = @semail, [mandantnr] = @imandantnr, [aktiv] = @baktiv, [erstellt_am] = @daerstellt_am, [mutiert_am] = @damutiert_am, [mutierer] = @imutierer WHERE [mitarbeiternr] = @imitarbeiternr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_mitarbeiter_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_mitarbeiter_Delete] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete an existing row from the table 'mitarbeiter' -- using the Primary Key. -- Gets: @imitarbeiternr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_mitarbeiter_Delete] @imitarbeiternr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE an existing row from the table. DELETE FROM [dbo].[mitarbeiter] WHERE [mitarbeiternr] = @imitarbeiternr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select Stored procedure, based on Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_mitarbeiter_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_mitarbeiter_SelectOne] GO --------------------------------------------------------------------------------- -- Stored procedure that will select an existing row from the table 'mitarbeiter' -- based on the Primary Key. -- Gets: @imitarbeiternr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_mitarbeiter_SelectOne] @imitarbeiternr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT an existing row from the table. SELECT [mitarbeiternr], [vorname], [name], [tgnummer], [email], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer] FROM [dbo].[mitarbeiter] WHERE [mitarbeiternr] = @imitarbeiternr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select All Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_mitarbeiter_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_mitarbeiter_SelectAll] GO --------------------------------------------------------------------------------- -- Stored procedure that will select all rows from the table 'mitarbeiter' -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_mitarbeiter_SelectAll] @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT all rows from the table. SELECT [mitarbeiternr], [vorname], [name], [tgnummer], [email], [mandantnr], [aktiv], [erstellt_am], [mutiert_am], [mutierer] FROM [dbo].[mitarbeiter] ORDER BY [mitarbeiternr] ASC -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- [End of Stored Procedures for table: mitarbeiter] -- ======================================================================================================== GO -- ======================================================================================================== -- [Stored Procedures generated for table: spalten] GO -- //// Insert Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_spalten_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_spalten_Insert] GO --------------------------------------------------------------------------------- -- Stored procedure that will insert 1 row in the table 'spalten' -- Gets: @ieintragnr int -- Gets: @stabelle varchar(255) -- Gets: @stabellenspalte varchar(255) -- Gets: @sspalte varchar(255) -- Gets: @bReadonly bit -- Gets: @balsHacken bit -- Gets: @iBreite int -- Gets: @iReihenfolge int -- Gets: @stiptext varchar(255) -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Gets: @imandantnr int -- Gets: @sNumberFormat varchar(255) -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_spalten_Insert] @ieintragnr int, @stabelle varchar(255), @stabellenspalte varchar(255), @sspalte varchar(255), @bReadonly bit, @balsHacken bit, @iBreite int, @iReihenfolge int, @stiptext varchar(255), @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @imandantnr int, @sNumberFormat varchar(255), @iErrorCode int OUTPUT AS SET NOCOUNT ON -- INSERT a new row in the table. INSERT [dbo].[spalten] ( [eintragnr], [tabelle], [tabellenspalte], [spalte], [Readonly], [alsHacken], [Breite], [Reihenfolge], [tiptext], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [mandantnr], [NumberFormat] ) VALUES ( @ieintragnr, @stabelle, @stabellenspalte, @sspalte, @bReadonly, @balsHacken, @iBreite, @iReihenfolge, @stiptext, @baktiv, @daerstellt_am, @damutiert_am, @imutierer, @imandantnr, @sNumberFormat ) -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Update Stored procedure for updating one single row. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_spalten_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_spalten_Update] GO --------------------------------------------------------------------------------- -- Stored procedure that will update an existing row in the table 'spalten' -- Gets: @ieintragnr int -- Gets: @stabelle varchar(255) -- Gets: @stabellenspalte varchar(255) -- Gets: @sspalte varchar(255) -- Gets: @bReadonly bit -- Gets: @balsHacken bit -- Gets: @iBreite int -- Gets: @iReihenfolge int -- Gets: @stiptext varchar(255) -- Gets: @baktiv bit -- Gets: @daerstellt_am datetime -- Gets: @damutiert_am datetime -- Gets: @imutierer int -- Gets: @imandantnr int -- Gets: @sNumberFormat varchar(255) -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_spalten_Update] @ieintragnr int, @stabelle varchar(255), @stabellenspalte varchar(255), @sspalte varchar(255), @bReadonly bit, @balsHacken bit, @iBreite int, @iReihenfolge int, @stiptext varchar(255), @baktiv bit, @daerstellt_am datetime, @damutiert_am datetime, @imutierer int, @imandantnr int, @sNumberFormat varchar(255), @iErrorCode int OUTPUT AS SET NOCOUNT ON -- UPDATE an existing row in the table. UPDATE [dbo].[spalten] SET [tabelle] = @stabelle, [tabellenspalte] = @stabellenspalte, [spalte] = @sspalte, [Readonly] = @bReadonly, [alsHacken] = @balsHacken, [Breite] = @iBreite, [Reihenfolge] = @iReihenfolge, [tiptext] = @stiptext, [aktiv] = @baktiv, [erstellt_am] = @daerstellt_am, [mutiert_am] = @damutiert_am, [mutierer] = @imutierer, [mandantnr] = @imandantnr, [NumberFormat] = @sNumberFormat WHERE [eintragnr] = @ieintragnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Delete Stored procedure using Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_spalten_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_spalten_Delete] GO --------------------------------------------------------------------------------- -- Stored procedure that will delete an existing row from the table 'spalten' -- using the Primary Key. -- Gets: @ieintragnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_spalten_Delete] @ieintragnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- DELETE an existing row from the table. DELETE FROM [dbo].[spalten] WHERE [eintragnr] = @ieintragnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select Stored procedure, based on Primary Key. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_spalten_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_spalten_SelectOne] GO --------------------------------------------------------------------------------- -- Stored procedure that will select an existing row from the table 'spalten' -- based on the Primary Key. -- Gets: @ieintragnr int -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_spalten_SelectOne] @ieintragnr int, @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT an existing row from the table. SELECT [eintragnr], [tabelle], [tabellenspalte], [spalte], [Readonly], [alsHacken], [Breite], [Reihenfolge], [tiptext], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [mandantnr], [NumberFormat] FROM [dbo].[spalten] WHERE [eintragnr] = @ieintragnr -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- //// Select All Stored procedure. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_spalten_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_spalten_SelectAll] GO --------------------------------------------------------------------------------- -- Stored procedure that will select all rows from the table 'spalten' -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[pr_spalten_SelectAll] @iErrorCode int OUTPUT AS SET NOCOUNT ON -- SELECT all rows from the table. SELECT [eintragnr], [tabelle], [tabellenspalte], [spalte], [Readonly], [alsHacken], [Breite], [Reihenfolge], [tiptext], [aktiv], [erstellt_am], [mutiert_am], [mutierer], [mandantnr], [NumberFormat] FROM [dbo].[spalten] ORDER BY [eintragnr] ASC -- Get the Error Code for the statement just executed. SELECT @iErrorCode=@@ERROR GO -- [End of Stored Procedures for table: spalten] -- ======================================================================================================== GO