top of page

Search Results

Diese Website durchsuchen

320 Ergebnisse gefunden mit einer leeren Suche

  • Db2

    8.1.2 - Build 2159 - 17.09.2019 <<< Sage 100 - 8.1 - Database - "ZUGFeRD" + "X-Rechnung" 8.1.2 - Build 2159 - 17.09.2019 19008 Erweiterung des "ZUGFeRD" Exports. Der Export von "ZUGFeRD" steht optional im Format 2.0 zur Verfügung / Extension of the "ZUGFeRD" export. The export of "ZUGFeRD" is optionally available in format 2.0 Deutsch Sage hat die Tabellenstrukturen der Tabelle "KHKKontokorrent" sowie die zugehörigen Anwendungsberechtigungen angepasst. Datenfeld Kontokorrent - ERechnungTyp/ZUGFeRD Über dieses Datenfeld wird pro Kontokorrent definiert, in welcher Form Rechnungen elektronisch übertragen werden sollen. So kann beispielsweise das "ZUGFeRD"-Format aktiviert werden, siehe Details zu "ZUGFeRD" . Der Name des Datenfeldes lautete in früheren Sage ERP-Versionen daher auch [ZUGFeRD] , wurde allerdings mit diesem QSP seitens Sage umbenannt in [ERechnungTyp] (siehe UPD-Datei "Update81Step006.upd"). Der Standardwert "100" steht für das bisherige "ZUGFeRD" 1.x-Format. English Sage has changed the table structures of the "KHKKontokorrent" table and the corresponding application rights. Debtor field - ERechnungTyp/ZUGFeRD This data field is used to define the form in which invoices are to be transmitted electronically for each debtor. For example, the "ZUGFeRD" format can be activated, see details of "ZUGFeRD" . The name of the data field was therefore also [ZUGFeRD] in earlier Sage ERP versions, but Sage renamed it to [ERechnungTyp] with this QSP (see UPD file "Update81Step006.upd"). The default value "100" stands for the previous "ZUGFeRD" 1.x format. <<< >>>

  • AppDes16

    9.0.6 - Build 7948 - 06.12.2023 <<< Sage 100 - 9.0.6.x - Drittanbieter-Lösungen mit Fremdsprachen 9.0.6 - Build 7948 - 06.12.2023 68637 Keine fremdsprachige Lösungen von Drittanbietern möglich! Deutsch Sage hat mitgeteilt, dass es in den aktuellen Sage 100 Versionen 9.0. 6 .x (bis einschl. R7936) einen massiven Fehler gibt: ⚠️AppDesigner von Tech Partnern / Drittanbietern, die Fremdsprachen einsetzen, können nicht mit der derzeitigen Sage 100 Version importiert werden!⚠️ Erst mit dem Hotfix Build 7948 vom 06.12.2023 wurde dieses Problem von Sage adressiert. Kommentar von Sage zur Fehlerbehebung Sofern das Live-Update und somit der Umzug der Metadaten bereits ausgeführt wurde, können die Sprachressourcen ggf. nachträglich mit dem Tool "MetadataMove.exe" separat in die neue Verzeichnisstruktur übernommen werden. Dazu muss zunächst die Datei "MetadataMove.exe" mit Kommandozeilenparameter "onlylanguagemetadata" ausgeführt werden. Beispiel: "C:\Program Files (x86)\Sage\Sage 100\9.0\Temp\MoveMetadata\MetadataMove.exe" "C:\Program Files (x86)\Sage\Sage 100\9.0" onlylanguagemetadata Anschließend muss zusätzlich die Datei "Sagede.Shared.RealTimeData.Metadata.Exchange.exe" mit Kommandozeilen Parameter /action=Update /metadatadir="C:\Program Files (x86)\Sage\Sage 100\9.0\Shared\Metadata" ausgeführt werden, damit die Sprach-Metadaten auf die aktuelle Version aktualisiert werden. Beispiel: "C:\Program Files (x86)\Sage\Sage 100\9.0\Shared\Sagede.Shared.RealTimeData.Metadata.Exchange.exe" /action=Update /metadatadir="C:\Program Files (x86)\Sage\Sage 100\9.0\Shared\Metadata" <<< >>>

  • CsvBulkImportWithBcp

    (alle Versionen/all versions) <<< Bulk Import CSV-Daten mit bcp Tool / Bulk import CSV data with bcp tool (alle Versionen/all versions) Freitag, 30. Juni 2023 Hintergrund / Background "xp_cmdshell" Import Struktur / Import structure Beispieldaten / example file Ziel-Tabelle zuerst erzeugen / Create target table first Import Script Fehlerauswertung wie? / Error evaluation how? Fazit: Großer Vorteil und doch Nachteile / Concusion: Huge advantage but also disadvantages Nützliche Links / useful links Hintergrund / Background Im vorliegenden Anwendungsfall mussten CSV-Rückgabedaten von dem Adressen-Sanktionslistenprüfprogramm “SanScreen” des Anbieters “BEX-Software” in den Microsoft SQL-Server importiert werden. Aufgrund der Tatsache, dass die Dateien teilweise extrem groß sein und mehrere Hundertausende Datensätze beinhalten können, musste ein möglichst performanter SQL-Import umgesetzt werden. Wir haben uns dazu entschlossen, die Daten mittels “bcp“ Importprogram des SQL-Servers durchzuführen. Voraussetzung dafür ist, dass die Funktion “xp_cmdshell“ im SQL-Server freigegeben ist. In this use case, CSV return data had to be imported into the Microsoft SQL server from the address-sanctions list check program "SanScreen" from the manufacturer "BEX-Software" . Because some files are extremely large and can contain several hundred thousand data CSV records, an SQL import with the highest possible performance had to be implemented. We decided to import the data using the SQL server's "bcp" import program . The prerequisite is that the "xp_cmdshell" function is enabled in the SQL server. "xp_cmdshell" EXEC master.dbo.sp_configure 'show advanced options', 1 RECONFIGURE EXEC master.dbo.sp_configure 'xp_cmdshell', 1 RECONFIGURE GO Import Struktur / Import structure Die CSV-Importstruktur ist relativ einfach: Es handelt sich um eine CSV-Datei. Codierung in Codepage "SSO-8859-1" (=SQL Server Code 28591) oder UTF-8 (=SQL Server Code 65001). Als Trennzeichen wird das Semikolon verwendet. Zeilenumbruch ist LineFeed (Hexcode 0x0A). Text ist in Anführungszeichen eingebettet (was wir erstmal ignorieren und bei uns mit einem Nachschaltprogramm auswerten). Am besten keine Spaltenüberschriften/keine Feldnamen in erster Zeile! Anmerkung: In der Praxis verwendet BEX-Software kein korrektes CSV-Format. Wurde für eine Adresse ein Treffer in einer Sanktionsliste ausgelöst, so wird ab der zweiten Spalte die vollständige ursprüngliche Prüfadresse mit übergeben!👎😕 Für unseren Anwendungsfall haben wir daher noch ein Konvertierungsprogramm zwischengeschaltet, welches die Daten "bereinigt": https://www.officium-inservio.com/ms-net-1/fastfilehandlingexample The CSV import structure is relatively simple: It is a CSV file. Encoding in code page "SSO-8859-1" (=SQL Server code 28591) or UTF-8 (=SQL Server code 65001). The semicolon is used as a separator. Newline character is LineFeed (Hexcode 0x0A). Text is embedded in quotation marks (which we ignore for the time being and evaluate later in our workflow, using an addon program). Avoid column headers/prefer no field names in first row! Note: In practice, BEX software does not use the correct CSV format. If a hit in a sanctions list was triggered for an address, the complete original test address is also transferred from the second column onwards! 👎😕For our application, we have therefore interposed a conversion program that "cleans" the data: https://www.officium-inservio.com/ms-net-1/fastfilehandlingexample Beispieldaten / example file "123_62_L";"NO_MATCH" "123_5_L";"NO_MATCH" "123_48_L";"NO_MATCH" "123_8_L";"NO_MATCH" "123_9_L";"NO_MATCH" "123_3_L";"NO_MATCH" "123_6_L";"NO_MATCH" "123_7_L";"NO_MATCH" "123_44_L";"NO_MATCH" "123_1_L";"NO_MATCH" "123_61_L";"NO_MATCH" "123_4_L";"NO_MATCH" Ziel-Tabelle zuerst erzeugen / Create target table first Für die Verwendung des Importprogramms muss die Ziel-Tabelle bereits existieren und bezüglich Datenfelder muss die Anordnung, Datentyp etc. alles genau zur Importstruktur passen! To use the import program, the target table must already exist and the arrangement, data type, etc. of the data fields must exactly all match the import structure! IF NOT EXISTS ( SELECT TOP 1 [Name] FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[tSanScreenCSVTest]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1 ) BEGIN CREATE TABLE [dbo].[tSanScreenCSVTest] ( [Reference] [nvarchar](50) NOT NULL ,[CheckResult] [nvarchar](50) NOT NULL ) ON [PRIMARY] END GO Import Script DECLARE @sServer VARCHAR(128) DECLARE @sDatabase VARCHAR(128) DECLARE @sDbAndTableName VARCHAR(512) DECLARE @sFieldTerminator VARCHAR(1) DECLARE @sImportFileName VARCHAR(512) DECLARE @sCommand VARCHAR(4000) -- No brackets in the server name! SET @sServer = 'W2019SVSAGDEV\MAIN' -- No brackets in any part of the fully qualified name to the target table! -- Note that you also must set the database name SET @sDbAndTableName = 'OLDemoReweAbfDR4741.dbo.tSanScreenCSVTest' -- It should be clear that the import file path must be accessible from the perspective of the SQL server! -- UNC paths might work, depending on the security right situation in the network. SET @sImportFileName = 'c:\Test\Adressen_20230623230007.res' SET @sFieldTerminator = ';' -- Notes about "bcp": -- Parameter "T" (capital letter!) indicates a trusted connection -- This implies that the executing login context, e.g. SQL Server agent account, got sufficient access rights to all relevant databases! -- The 0x0A is the Hex code for line feed! -- The "C" parameter (capital letter!) indicates the unicode id of the charset. 65001 is UTF-8 (see additional web links) SET @sCommand = 'bcp ' + @sDbAndTableName + ' in "' + @sImportFileName + '" -S ' + @sServer + ' -T -c -C65001 -t"' + @sFieldTerminator + '" -r "0x0A"' EXECUTE master.dbo.xp_cmdshell @sCommand GO Fehlerauswertung wie? / Error evaluation how? Es stellt sich die Frage, wie man an eventuelle Fehlermeldungen kommt, falls die Ausführung des externen “bcp“ Tools fehlschlägt. Schließlich handelt es sich um eine Shell-Ausführung, d.h. kein “normales“ Fehlermanagement des MS-SQL-Servers wie bei sonstigen SQL-Aktionen. Das nachfolgende Script zeigt einen möglichen Ansatz für die Ermittlung aller Fehlermeldungen des Tools. The question arises as to how you can get to any error messages if the execution of the external "bcp" tool fails. After all, it is a shell execution, i.e. no "normal" error management of the MS SQL server as with other SQL actions. The following script shows a possible approach for determining all error messages from the tool. DECLARE @tblCommandResult TABLE ( [ID] int IDENTITY, [ResultText] VARCHAR(MAX) NULL ) DECLARE @lResultCode INT INSERT @tblCommandResult EXEC @lResultCode = master.dbo.xp_cmdshell @sCommand IF @lResultCode <> 0 BEGIN DECLARE @sMsg VARCHAR(MAX) SET @sMsg = '' -- Select all messages from temp. table SELECT @sMsg = @sMsg + ' ' + [ResultText] FROM @tblCommandResult WHERE NOT [ResultText] IS NULL SELECT @sMsg END Fazit: Großer Vorteil und doch Nachteile / Concusion: Huge advantage but also disadvantages Großer Vorteil: Der Import ist extrem schnell. Der Import von mehren Hunderttausend Datensätzen dauert nur wenige Sekunden! Nachteile: Es handelt sich um ein Programm, welches in der Shell außerhalb der normalen SQL-Server-Umgebung aufgerufen werden muss (diese Funktion muss vorher freigeschaltet sein). Gewöhnungsbedürftige Parameter-Syntax. Fehlermanagement aufwändiger. Die Importstrukturen müssen exakt abgestimmt sein. Die CSV-Importdatei muss durchgängig denselben Aufbau haben. Verwendung von CSV-Steuerzeichen in den Daten selber (z.B. LineFeed in Datenfeldern) führen zu Problemen beim Import. Huge advantage: The import is extremely fast! Importing hundreds of thousands of records takes just a few seconds. Disadvantages: The program must be called in the shell outside the normal SQL server environment (this function must be enabled beforehand). Parameter syntax that takes some getting used to. Error management more complex. The import structures must be precisely coordinated. The CSV import file must have the same structure throughout. Using CSV control characters in the data itself (e.g. LineFeed in data fields) leads to problems during import. Nützliche Links / useful links "bcp": learn.microsoft.com bcp utility - SQL Server The bulk copy program (bcp) utility bulk copies data between an instance of SQL Server and a data file in a user-specified format. Codepages: https://www.example-code.com/sql/load_text_file_using_code_page.asp <<< >>>

  • PathPlaceholders

    PathPlaceholders <<< Pfad Platzhalter / Path placeholders (alle Versionen/all versions) Montag, 17. April 2023 Auflistung Platzhalter / List of placeholders Beispiel / Example Sage Quellcode / Sage source Auflistung Platzhalter / List of placeholders Beispiel / Example Die Platzhalter enthalten seitens Sage einen Backslash am Ende. Um eine Datei in den Unterordner "Test" im \Shared-Ordner des Sage ERP-Systems auszurollen, ist wie folgt vorzugehen. $[SharedPath]Test\Test.exe Sage Quellcode / Sage source Sagede.OfficeLine.Shared.Placeholders.FilePathPlaceholderResolver <<< >>>

  • OpenFileDialog

    OpenFileDialog <<< Datei-Speichern Dialog aus Makros benutzen / File-Save dialogue from macros 9.0.x Dienstag, 23. Juni 2026 Deutsch Hintergrund Datenherkunft Kontextmenü Makro-Code Integration in das Oberflächen-Element Deutsch Hintergrund Sehr häufig muss man dem Anwender die Möglichkeit geben , eine Ziel-Datei für eine Datei-Aktion in einem Dialog zu verwenden , z.B. in einem Selektionselement. Dies ist recht leicht über entsprechende Makro-Befehle und einen Kontextmenü-Eintrag für eine Datei-Speichern-Funktion umsetzbar. Beispielansicht: Vorgabe eines Export-Dateinamens - in dem Fall eine anzulegende MS-Excel-Exportdatei. Datenherkunft Üblicherweise hat man eine Datenstruktur oder ein sonstiges Daten-Element , in dem die Definition des Dateinamens zu erfolgen hat. Kontextmenü Entscheidend ist das Kontextmenü. In diesem definiert man alle Details zur eigentlichen Datei-Auswahl , was auf den ersten Blick merkwürdig erscheint , aber klarer wird , sobald man sieht , dass man den Kontextmenü-Eintrag dem Daten-Element zuordnen kann (siehe nachfolgend weiter unten). Im Kontextmenü definiert man als nächstes einen klassischen Makro-Aufruf: Makro-Code Der Makro-Code ist überschaubar. Es wird " OpenFileDialog " bzw. " DateidialogÖffnen " verwendet - entscheidend ist der Modus " DateiSpeichern " als Parameter 1. Der Rest ist relativ selbsterklärend. Integration in das Oberflächen-Element Der letzte Schritt ist konsequenterweise der Einbau des Datenfeldes in das jeweilige Oberflächen-Element , im vorliegenden Fall ein Selektionselement. Genau an dieser Stelle schließt sich der Kreis. Dem Oberflächen-Element ist natürlich o.g. Kontextmenü zuzuordnen. Im Datenfeld im Oberflächen-Element definiert man nach Bedarf ein Symbol/ein Icon (siehe Icons, die Sage ausrollt) und - ganz wichtig - man muss dem Datenfeld im Oberflächen-Element natürlich den konkreten Menüeintrag aus dem Kontextmenü zuweisen. Das ist schon alles an dieser Stelle - den Rest erledigt der AppDesigener komplett automatisch , wie es sein soll 👍🏻. Die Ansicht zeigt die entscheidende Verbindung zwischen dem Datenfeld im Oberflächen-Element und dem Kontextmenü! <<< >>>

  • ErrorMacroCollectionKey

    ErrorMacroCollectionKey <<< 9.0.x - Makrofehler Collection Key bei Variablen-Übergaben / macro error collection key if passing variables (alle Versionen/all versions) Freitag, 13. März 2026 Deutsch Situation/Fehler Es wird in einem AppDesigner-Makro eine Variablen-Liste definiert und an Folge-Prozesse übergeben , z.B. an eine Client-DLL. Beim Ausführen des Makros erhält man im Sage TraceLog einen äußerst kryptischen Fehler. Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroException: Fehler beim Ausführen des Makros 'x.OnExecute' in Zeile 21, Makrobefehl 'AufrufenDllClient | Tests.Sage.OL.x.RealTimeData.dll | Tests.Sage.OL.x.RealTimeData.ClientCode.y | [_Mode];[_UserId];[_Geschaeftsjahr];[_ImportType];[_SourceFolder];[_SourceFileEncodingType];[_ReturnLocalTempFileNameForBlobStorageUpload];[_ReturnText];[_ReturnMustCancel] '. ---> System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add ) at Sagede.OfficeLine.ControlCenter.Host.ControlCenterHostBase.NamedParametersToTransferParameters(NamedParameters parameters, Dictionary2& transferParameters) at Sagede.OfficeLine.ControlCenter.Host.ControlCenterHostBase.CallClientDLL(String libraryFile, String className, NamedParameters parameters, NamedParameters result) at Sagede.Shared.ControlCenter.Controller.PartControls.PartViewModelBase.ExecuteMacroFunction(CallDllOnClientParameters parameters) at Sagede.Shared.ControlCenter.Controller.PartControls.PartViewModelBase.OnMacroCallbackFromField(MacroCallbackArgs args, String activeMacroFieldname) at Sagede.Shared.ControlCenter.Controller.PartControls.Selection.View.SelectionPartViewModel.OnMacroCallbackFromField(MacroCallbackArgs args, String activeMacroFieldname) at Sagede.Shared.ControlCenter.Controller.Shared.DialogDataFields.OnMacroCallback(MacroCallbackArgs args) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.Commands.CallDllOnClientMacroCommand.Execute(IMacroCommandsParent parent, IndexedList parameters, IndexedList debugParameters) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.Commands.MacroCommands.ExecuteMacroCommand(IMacroCommandsParent parent, Macro macro, Macro debugInfo, Boolean& handled, Boolean isRunningOnServer) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroInterpreter.ExecuteMacroCommand(Macro macro, Macro debugInfo) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroInterpreter.Run(Macro macro, Int32 lineNumber) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroInterpreter.RunMacros(Macros macros) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroHandler.InterpreterExecuteMacros(Macros macros, Boolean& cancel, Boolean& closeDialog) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroHandler.ExecuteMacros(MacroContext macroContext, Macros macros, Boolean resetInterpreter, Boolean& cancel, Boolean& closeDialog) Ursache/Lösung Schaut man sich die Parameter-Liste an , so fällt sofort auf , dass es gar keinen doppelten Schlüssel gibt. Die Meldung von Sage ist komplett irreführend (wie so oft!). Die tatsächliche Ursache ist der leider sehr schlechte Makro-Parser von Sage , in Kombination mit dem internen Definieren und Serialisieren der Collections mit den Parametern , insbesondere bei Boolean-Werten. Sage hat ein massives Problem mit Boolean-Zuordnungen wie "SetVariable ..." / "VariableFestlegen ..." , wenn der Wert z.B. mit "False" vorbelegt wird. Der einfachste Workaround ist , statt eine Variable mit "False" zu definieren , einfach einen Integerwert 0 vorzubelegen. Beispielansicht: Wurde "False" anstatt 0 eingetragen , um Sage zum generischen Typ "Boolean" zu bewegen , erscheint eine "abstruse" Key-Verletzungsmeldung. Die Vorbelegung als Integer Typ lässt die Meldung sofort verschwinden! <<< >>>

  • SageLicenceServerTestConnection

    SageLicenceServerTestConnection <<< Sage 100 Verbindung zum Lizenzserver prüfen / check connection to Sage 100 license server (alle Versionen/all versions) Dienstag, 13. Januar 2026 Deutsch Hintergrund Damit die Sage 100-Anwendung ohne Probleme die Lizenz prüfen kann , muss der Sage 100 Lizenzserver von Sage erreichbar sein. Um auf einer Maschine zu testen , ob die Netzwerk-Internet-Verbindung zum Sage Lizenzserver erfolgreich möglich ist , kann nachfolgende PowerShelll-Anweisung benutzt werden. PowerShell-Script für Test der Verbindung Öffnen Sie die PowerShell und führen Sie folgende Anweisung aus. test-netconnection licensing2.services.sage.com -Port 443 Beispielansicht PowerShell-Script Was dieser Befehl macht: Dieser Befehl verwendet das Cmdlet "Test-NetConnection" , um eine Netzwerk-Diagnose durchzuführen. Im Einzelnen: "licensing2.services.sage.com": Dies ist der Ziel-Hostname. Er verweist auf den externen Server , den Sage zur Validierung von Softwarelizenzen verwendet. "Port 443": Gibt an, dass der Test versucht, eine Verbindung über den TCP-Port 443 herzustellen. Dies ist der Standardport für sicheren Web-Datenverkehr (HTTPS). Zusammengefasst: Der Befehl prüft, ob ein Computer den Sage-Lizenzserver erfolgreich über das Internet erreichen kann. Ergebnis im o.g. Screenshot: Die Zeile "TcpTestSucceeded : True" zeigt an, dass die Verbindung erfolgreich war. Die Firewall oder das Netzwerk blockiert die Verbindung zum Sage-Lizenzserver nicht . <<< >>>

  • ProcedureGetHtmlTable

    (alle Versionen/all versions) <<< Prozedur: Datentabelle als Html / Procedure: Datatable as Html (alle Versionen/all versions) Freitag, 30. Dezember 2022 Beschreibung/Description Beispielverwendung/Example how to use Ergebnis/Result Abhängigkeiten/Requirements Wichtig/Important T-SQL Definition Beschreibung/Description Ein möglicher Ansatz, um Daten als Html-Tabelle zu erhalten. A possible approach to get data as Html table . Beispielverwendung/Example how to use DECLARE @lRC int DECLARE @sSqlSelect nvarchar(max) DECLARE @lOptionalTopRecord int DECLARE @sTableHtmlId nvarchar(255) DECLARE @sTableHeaderCaptions nvarchar(max) DECLARE @bTableHeaderCaptionsContainHtml bit DECLARE @nStyle smallint DECLARE @bTableDataContainsHtml bit DECLARE @bTableAllowSort bit DECLARE @sReturnHtml nvarchar(max) -- Avoid complex Sql! Use a view instead! SET @sSqlSelect = N'SELECT Artikelnummer, Matchcode FROM dbo.KHKArtikel WITH(Readuncommitted) WHERE Mandant=123 ORDER BY Artikelnummer' -- It is recommended to limit the output, like in paging! -- Otherwise the stored procedure might run a long time, depending on the amount of data. SET @lOptionalTopRecord = 50 -- If the Html table is being referred to in any other Html code, the table should be given a proper name! -- Otherwise, use a dummy name. SET @sTableHtmlId = N'MyTable1' -- You must set the header captions! SET @sTableHeaderCaptions = N'Item number;Item caption' SET @bTableHeaderCaptionsContainHtml = 1 SET @nStyle = 1 SET @bTableDataContainsHtml = 0 -- Allowing to sort the result might not work in all browsers! SET @bTableAllowSort = 1 EXECUTE @lRC = [dbo].[spSAGGetHtmlTable] @sSqlSelect ,@lOptionalTopRecord ,@sTableHtmlId ,@sTableHeaderCaptions ,@bTableHeaderCaptionsContainHtml ,@nStyle ,@bTableDataContainsHtml ,@bTableAllowSort ,@sReturnHtml OUTPUT SELECT @sReturnHtml GO Ergebnis/Result Abhängigkeiten/Requirements https://www.officium-inservio.com/ms-sql/functionremoveleftorright https://www.officium-inservio.com/ms-sql/functiontablesplitstring Wichtig/Important Der in dieser Datenbankprozedur verwendete Ansatz ist bewusst sehr einfach gehalten und ausdrücklich für kleine Datenmengen konzipiert. Mit dem primären Ziel, den Quellcode einfach und lesbar zu halten, um bei Bedarf auch bei einzelnen Ausgabezeilen in die Datenausgabe eingreifen zu können. Es steht völlig außer Frage, dass es mit SQL (insbesondere mit dem Microsoft SQL-Server) weitaus performantere Wege gibt, um sehr umfangreiche Datenmengen in Html umzuwandeln! Um den Quellcode lesbar zu halten, wird für einige Parsingvorgänge ein etwas "hässlicher" Workaround verwendet. Es gibt höchstwahrscheinlich bessere Möglichkeiten, die Daten zu analysieren, aber die aktuelle Version erfüllt die Aufgabe gut, eine schnelle Datentabelle für eine begrenzte Anzahl von Datensätzen zu erhalten. Sie sollten sich darüber im Klaren sein, dass der Ansatz dieser Datenbankprozedur nur eine sehr begrenzte Prüfung zur Vermeidung jeglicher SQL-Injection enthält! Bitte stellen Sie sicher, dass die Eingabe-SQL gültig und in keiner Weise "schädlich" ist. Es wird dringend empfohlen, die Quelldaten in einer SQL-Sicht zu kapseln und diese Datenbankprozedur nur mit einer sehr einfachen SQL-Select-Anweisung aufzurufen! The approach used in this stored procedure is deliberately kept very simple and designed specifically for small amounts of data . The primary goal is to keep the source code simple and readable in order to be able to intervene in the data output, even with each individual output line if necessary . There is absolutely no question that with SQL (especially with the Microsoft SQL Server), there are far better-performing ways to convert very large amounts of data into Html! To keep the source code readable, for some parsing, a somewhat "ugly" workaround is being used. There are most likely better ways to parse the data, but the current version serves the purpose well of getting a quick data table for a limited amount of data records. You should be aware that this procedure only contains a very limited approach to avoid any SQL injection! Please, make sure that the input SQL is valid and not "harmful" in any way. It is highly recommended to encapsulate the source data into an SQL view and just call this stored procedure with a very simple SQL select statement only! T-SQL Definition File_MSSQL_gtblSAG_Get_Text_Split_gsSAG_Remove_LeftOrRight_gsSAG_Remove_LeftOrRight .zip ZIP herunterladen • 8KB IF EXISTS ( SELECT TOP 1 [Name] FROM dbo.sysobjects WITH(Readuncommitted) WHERE id = OBJECT_ID(N'[dbo].[spSAGGetHtmlTable]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1 ) BEGIN DROP PROCEDURE [dbo].[spSAGGetHtmlTable] END GO CREATE PROCEDURE [dbo].[spSAGGetHtmlTable] ( @sSqlSelect nvarchar(max) ,@lOptionalTopRecord int ,@sTableHtmlId nvarchar(255) ,@sTableHeaderCaptions nvarchar(max) ,@bTableHeaderCaptionsContainHtml bit ,@nStyle smallint ,@bTableDataContainsHtml bit ,@bTableAllowSort bit ,@sReturnHtml nvarchar(max) OUT ) AS -- Purpose: -- Get a simple Html table! -- The column data will be transformed into simple strings. -- Any complex Sql statements should be put into a Sql view! -- Which gives you more control also how to transfer the data columns into strings. -- Like currency or date value formatting. -- Returns 0 if success; otherwise an error code might be returned. -- Requirements/dependencies: -- This procedure needs other functions, and/or procedures: -- "gtblSAG_Get_Text_Split" -- "gsSAG_Remove_LeftOrRight" -- Parameters: -- @sSqlSelect = -- Mandatory: Simple SQL select statement. No(!) complex joins, no "update", "alter" SQL statements or the like. -- Also no "TOP" instruction (see the separate parameter of this procedure). -- Tip: Encapsulate more complex queries in an SQL view and then pass the view in a simple SQL select statement! -- -- @lOptionalTopRecord = -- Recommended: Record count for a "TOP" selection. -- If specified (>0), then this maximum number of data records is selected. -- -- @sTableHtmlId = -- Recommended: Content for ID tag of table/name of table for returned html. -- -- @sTableHeaderCaptions = -- Mandatory: Column header captions. Use semicolon to separate the columns. -- -- @bTableHeaderCaptionsContainHtml = -- Mandatory: Specify if the parameter for the column header captions contain Html instructions. -- Caution: If activated, the caller is responsible for ensuring that the column header captions are valid HTML statements! -- -- @nStyle = -- Mandatory: Select the CCS formatting style. -- Currently, this procedure supports six types (1-6). -- -- @bTableDataContainsHtml = -- Mandatory: Specify if the parameter for the column data contain Html instructions. -- Caution: If activated, the caller is responsible for ensuring that the column data content is valid HTML! -- -- @bTableAllowSort = -- Mandatory: Specify whether the table should be designed as sortable using JavaScript (not supported by all browsers!). -- Any JavaScript is "manageable", i.e. "uncritical" for most browsers and is usually not(!) blocked. -- Under certain circumstances, however, such scripts are ignored/blocked, e.g. in HTML-formatted e-mail content by certain e-mail programs! -- Common HTML scripting standards are adhered to. -- -- @sReturnHtml = -- Mandatory: Ouput of the fully generated HTML for the table, including the data. -- Any JavaScript is "manageable", i.e. "uncritical" for most browsers and is usually not(!) blocked. -- Under certain circumstances, however, such scripts are ignored/blocked, e.g. in HTML-formatted e-mail content by certain e-mail programs! -- Common HTML scripting standards are adhered to. -- To keep the source code readable, for some parsing, a somewhat "ugly" workaround is being used. -- There are most likely better ways to parse the data, but the current version serves the purpose well of getting a quick data table for a limited(!) amount of data records. -- You should be aware that this procedure only contains a very limited approach to avoid any SQL injection! -- Please, make sure that the input SQL is valid and not "harmful" in any way. -- Again, it is highly recommended to encapsulate the source data into an SQL view and just call this stored procedure with a very simple SQL select statement only! SET NOCOUNT ON DECLARE @sProcedure NVARCHAR(255) SET @sProcedure = 'spSAGGetHtmlTable' SET @sReturnHtml = N'SAG: 202111171: ' + @sProcedure + N': No valid data!' SET @bTableHeaderCaptionsContainHtml = ISNULL(@bTableHeaderCaptionsContainHtml, 0) SET @lOptionalTopRecord = ISNULL(@lOptionalTopRecord, 0) SET @nStyle = ISNULL(@nStyle, 0) IF @nStyle = 0 SET @nStyle =1 SET @bTableDataContainsHtml = ISNULL(@bTableDataContainsHtml, 0) SET @bTableAllowSort = ISNULL(@bTableAllowSort, 0) SET @sTableHtmlId = LTRIM(RTRIM(ISNULL(@sTableHtmlId, N''))) IF @sTableHtmlId = N'' BEGIN SET @sTableHtmlId = REPLACE(CAST(NEWID() AS nvarchar(255)), N'-', N'') END SET @sTableHtmlId = ( SELECT TOP 1 @sTableHtmlId FOR XML PATH('') ) SET @sSqlSelect = LTRIM(RTRIM(ISNULL(@sSqlSelect, N''))) -- Check table header columns DECLARE @sErrorTableHeaderCaptions NVARCHAR(MAX) SET @sErrorTableHeaderCaptions = N'No table header captions provided! You must provide a semicolon separated list of table header captions! ' + N'The amount of header captions must match the selected field column count!' SET @sTableHeaderCaptions = LTRIM(RTRIM(ISNULL(@sTableHeaderCaptions, N''))) IF @sTableHeaderCaptions = N'' BEGIN SET @sReturnHtml = N'SAG: 202111174: ' + @sProcedure + N': ' + @sErrorTableHeaderCaptions RETURN 1 END -- Check Sql statement IF @sSqlSelect = N'' BEGIN SET @sReturnHtml = N'SAG: 202111176: ' + @sProcedure + N': No Sql select clause provided!' RETURN 3 END DECLARE @sErrorSqlSelectStatement NVARCHAR(MAX) SET @sErrorSqlSelectStatement = N'Invalid or too complex Sql select clause provided. Premises: Sql must be a most simple Sql select statement.' + N'It must contain one "Select" and "Where" clause.' + N'It must not contain a TOP clause!' + N'It must not contain * for column selection! I.e. provide all column names separately!' + N'No semicolon allowed!' + N'No altering Sql keywords allowed!' + N'Hint: consider putting complex Sql into an Sql view and provide this method with the name of the Sql view with a very simple Sql-Clause instead.' + N'Also, consider converting all data columns of your view into string values. By doing so, you can control yourself how currency or data values are to be formatted.' + N'Be aware to set the parameters for the table generation properly, regarding whether the actual data content contains valid Html code or not!' + N'' IF CHARINDEX(N';', @sSqlSelect) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'DROP ')) = N'DROP ' OR CHARINDEX(N' DROP ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'DELETE ')) = N'DELETE ' OR CHARINDEX(N' DELETE ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'INSERT ')) = N'INSERT ' OR CHARINDEX(N' INSERT ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'UPDATE ')) = N'UPDATE ' OR CHARINDEX(N' UPDATE ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'ALTER ')) = N'ALTER ' OR CHARINDEX(N' ALTER ', UPPER(@sSqlSelect)) > 0 OR CHARINDEX(N' TOP ', UPPER(@sSqlSelect)) > 0 -- Must contain Select and Where OR CHARINDEX(N' SELECT ', UPPER(N' ' + @sSqlSelect)) = 0 OR CHARINDEX(N' WHERE ', UPPER(N' ' + @sSqlSelect)) = 0 BEGIN SET @sReturnHtml = N'SAG: 202111177: ' + @sProcedure + N': ' + @sErrorSqlSelectStatement RETURN 4 END DECLARE @sSqlOnlyFromClause NVARCHAR(MAX) DECLARE @sSqlOnlyFields NVARCHAR(MAX) SET @sSqlOnlyFromClause = [dbo].[gsSAG_Remove_LeftOrRight] ( @sSqlSelect , N'SELECT' , 1 , 0 ) SET @sSqlOnlyFields = SUBSTRING( @sSqlOnlyFromClause , 1 , CHARINDEX( N'FROM ', @sSqlOnlyFromClause ) - 1 ) SET @sSqlOnlyFromClause = SUBSTRING( @sSqlOnlyFromClause , CHARINDEX( N'FROM ', @sSqlOnlyFromClause ) , LEN(@sSqlOnlyFromClause) ) IF CHARINDEX(N'*', @sSqlOnlyFields) > 0 BEGIN SET @sReturnHtml = N'SAG: 202111178: ' + @sProcedure + N': ' + @sErrorSqlSelectStatement RETURN 5 END DECLARE @sHtmlCss nvarchar(max) DECLARE @sHtmlClassId1 nvarchar(20) DECLARE @sHtmlTableOuter nvarchar(max) DECLARE @sHtmlTableHeaders nvarchar(max) DECLARE @sHtmlTableHeaderCaptionTemplate nvarchar(255) DECLARE @sHtmlTableRows nvarchar(max) DECLARE @sHtmlTableRowTemplate nvarchar(MAX) DECLARE @sHtmlTableRowColTemplate1 nvarchar(MAX) DECLARE @sHtmlTableRowColTemplate2 nvarchar(MAX) DECLARE @sHtmlSortScript nvarchar(max) SET @sHtmlSortScript = N'' SET @sHtmlTableRowColTemplate1 = N'' SET @sHtmlTableRowColTemplate2 = N'' -- Usw free www tools for CSS , example: https://www.tablesgenerator.com/html_tables# IF @nStyle < 0 OR @nStyle > 6 BEGIN SET @nStyle = 1 END SET @sHtmlClassId1 = N'tg-0lax' IF @nStyle = 1 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 2 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 3 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 4 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 5 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 6 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @bTableAllowSort <> 0 BEGIN SET @sHtmlSortScript = N'' END SET @sHtmlTableHeaderCaptionTemplate = N'||$ColName$||' + NCHAR(13) + NCHAR(10) SET @sHtmlTableRowTemplate = N' ||$TblRowAllColumnsContent$|| ' SET @sHtmlTableOuter = @sHtmlCss + NCHAR(13) + NCHAR(10) + N' ||$TblHeaderCol$|| ||$TblRows$|| ' -- Determine table captions DECLARE @lColCountHeaders INT SET @lColCountHeaders = 0 SET @sHtmlTableHeaders = N'' DECLARE @sCaption nvarchar(max) IF CHARINDEX(N';', @sTableHeaderCaptions) = 0 BEGIN SET @sTableHeaderCaptions = ISNULL(@sTableHeaderCaptions, N'') + N';' END DECLARE cSAGHtmlHelpersGetHtmlTableDataCaptions CURSOR FOR SELECT [TextPart] FROM [dbo].[gtblSAG_Get_Text_Split] ( @sTableHeaderCaptions , N';' ) WHERE LTRIM(RTRIM(ISNULL([TextPart], N''))) <> N'' ORDER BY [Nr] OPEN cSAGHtmlHelpersGetHtmlTableDataCaptions IF @@Cursor_Rows <> 0 BEGIN FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataCaptions INTO @sCaption WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @lColCountHeaders = @lColCountHeaders + 1 IF @bTableHeaderCaptionsContainHtml = 0 BEGIN SET @sCaption = ( SELECT TOP 1 ISNULL(@sCaption, N'(undefined)') FOR XML PATH('') ) END SET @sHtmlTableHeaders = @sHtmlTableHeaders + REPLACE(@sHtmlTableHeaderCaptionTemplate, N'||$ColName$||', @sCaption) FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataCaptions INTO @sCaption END CLOSE cSAGHtmlHelpersGetHtmlTableDataCaptions END DEALLOCATE cSAGHtmlHelpersGetHtmlTableDataCaptions IF @lColCountHeaders = 0 BEGIN SET @sReturnHtml = N'SAG: 202111175: ' + @sProcedure + N': ' + @sErrorTableHeaderCaptions RETURN 2 END -- Table definition SET @sHtmlTableOuter = REPLACE(@sHtmlTableOuter, N'||$TblHeaderCol$||', @sHtmlTableHeaders) IF LTRIM(RTRIM(ISNULL(@sHtmlSortScript, N''))) <> N'' BEGIN SET @sHtmlTableOuter = @sHtmlTableOuter + NCHAR(13) + NCHAR(10) + @sHtmlSortScript END SET @sReturnHtml = @sHtmlTableOuter -- Build own Sql column clause DECLARE @lColCount INT DECLARE @sColSep NVARCHAR(10) DECLARE @sColSepBugFixReplacement NVARCHAR(10) DECLARE @sColAll NVARCHAR(MAX) SET @lColCount = 0 SET @sColSep = N'||_||||_||' -- Note, the method 'gtblSAG_Get_Text_Split' got a bug in some versions, where parts of the replacement will be added as content: SET @sColSepBugFixReplacement = N'|_||||_||' SET @sColAll = N'' IF CHARINDEX(N',', @sSqlOnlyFields) = 0 BEGIN SET @sSqlOnlyFields = ISNULL(@sSqlOnlyFields, N'') + N',' END DECLARE cSAGHtmlHelpersGetHtmlTableDataColumns CURSOR FOR SELECT [TextPart] FROM [dbo].[gtblSAG_Get_Text_Split] ( @sSqlOnlyFields , N',' ) WHERE LTRIM(RTRIM(ISNULL([TextPart], N''))) <> N'' ORDER BY [Nr] OPEN cSAGHtmlHelpersGetHtmlTableDataColumns IF @@Cursor_Rows <> 0 BEGIN DECLARE @sCol AS NVARCHAR(1025) DECLARE @lIdx INT FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataColumns INTO @sCol SET @lIdx = 0 WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @lColCount = @lColCount + 1 SET @lIdx = @lIdx + 1 SET @sCol = REPLACE(REPLACE(LTRIM(RTRIM(ISNULL(@sCol, N''))), N'[', N''), N']', N'') IF @sCol <> N'' BEGIN IF @lIdx > 1 BEGIN SET @sColAll = ISNULL(@sColAll, N'') + N' + ' + NCHAR(39) + @sColSep + NCHAR(39) + N' + ' END SET @sColAll = ISNULL(@sColAll, N'') + N'CAST(ISNULL([' + @sCol + N'], N' + NCHAR(39) + NCHAR(39) + N') AS NVARCHAR(MAX))' END FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataColumns INTO @sCol END CLOSE cSAGHtmlHelpersGetHtmlTableDataColumns END DEALLOCATE cSAGHtmlHelpersGetHtmlTableDataColumns IF @lColCount <> @lColCountHeaders BEGIN SET @sReturnHtml = N'SAG: 2021111719: ' + @sProcedure + N': Column count missmatch! ' + N'Provided header columns: ' + CAST(@lColCountHeaders AS nvarchar(50)) + N'. ' + N'Provided data columns: ' + CAST(@lColCount AS nvarchar(50)) + N'. ' RETURN 6 END IF LTRIM(RTRIM(ISNULL(@sColAll, N''))) <> N'' BEGIN SET @sColAll = @sColAll + N' AS [DataBigCol] ' SET @sSqlSelect = N'SELECT ' IF @lOptionalTopRecord > 0 BEGIN SET @sSqlSelect = @sSqlSelect + N' TOP ' + CAST(@lOptionalTopRecord AS NVARCHAR(50)) + N' ' END SET @sSqlSelect = @sSqlSelect + @sColAll + N' ' + @sSqlOnlyFromClause -- PRINT @sSqlSelect -- Get the actual data DECLARE @lRC INT DECLARE @sSQL NVARCHAR(MAX) -- Define cursor SET @sSQL = N'DECLARE cSAGHtmlHelpersGetHtmlTableData CURSOR FOR ' + N' ' + @sSqlSelect + N' ' EXEC @lRC = sp_executesql @sSQL IF @lRC <> 0 BEGIN SET @sReturnHtml = N'SAG: 2021111710: ' + @sProcedure + N': ' + CAST(ISNULL(@lRC, 0) AS NVARCHAR(50)) + N': Error while executing the SQL statement: ' + ISNULL(@sSQL, N'') RETURN 7 END -- Open cursor OPEN cSAGHtmlHelpersGetHtmlTableData SET @sHtmlTableRows = N'' IF @@Cursor_Rows<>0 BEGIN DECLARE @lRow INT DECLARE @lCol INT DECLARE @sAllData NVARCHAR(MAX) DECLARE @sAllDataReal NVARCHAR(MAX) DECLARE @sHtmlTableRow NVARCHAR(MAX) DECLARE @sHtmlTableCol NVARCHAR(MAX) DECLARE @sHtmlTableColAll NVARCHAR(MAX) DECLARE @sHtmlTableColTemplInner NVARCHAR(MAX) -- Select first record FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableData INTO @sAllData SET @lRow = 0 SET @lIdx = 0 -- Loop all records WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @sAllData = ISNULL(@sAllData, N'') SET @lRow = @lRow + 1 SET @lIdx = @lIdx + 1 IF @lIdx = 1 BEGIN SET @sHtmlTableColTemplInner = @sHtmlTableRowColTemplate1 END IF @lIdx = 2 BEGIN SET @sHtmlTableColTemplInner = @sHtmlTableRowColTemplate2 END IF @lIdx >= 2 SET @lIdx = 0 SET @sHtmlTableColAll = N'' -- Main work IF CHARINDEX(@sColSep, @sAllData) = 0 BEGIN SET @sAllData = ISNULL(@sAllData, N'') + @sColSep END DECLARE cSAGHtmlHelpersGetHtmlTableDataInner CURSOR FOR SELECT [TextPart] FROM [dbo].[gtblSAG_Get_Text_Split] ( @sAllData , @sColSep ) OPEN cSAGHtmlHelpersGetHtmlTableDataInner IF @@Cursor_Rows <> 0 BEGIN FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataInner INTO @sAllDataReal SET @lCol = 0 WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @lCol = @lCol + 1 IF @lCol > 1 SET @sHtmlTableColAll = ISNULL(@sHtmlTableColAll, N'') + NCHAR(13) + NCHAR(10) IF @lCol <= @lColCountHeaders BEGIN SET @sAllDataReal = REPLACE(REPLACE(ISNULL(@sAllDataReal, N''), @sColSep, N''), @sColSepBugFixReplacement, N'') SET @sAllDataReal = ISNULL(@sAllDataReal, N'') -- This is the real content of the column! IF @bTableDataContainsHtml = 0 BEGIN SET @sAllDataReal = ( SELECT TOP 1 ISNULL(@sAllDataReal, N'') FOR XML PATH('') ) END SET @sHtmlTableCol = REPLACE( @sHtmlTableColTemplInner , N'||$ColInnerFieldContent$||' , @sAllDataReal ) SET @sHtmlTableColAll = ISNULL(@sHtmlTableColAll, N'') + @sHtmlTableCol END FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataInner INTO @sAllDataReal END CLOSE cSAGHtmlHelpersGetHtmlTableDataInner END DEALLOCATE cSAGHtmlHelpersGetHtmlTableDataInner SET @sHtmlTableColAll = ISNULL(@sHtmlTableColAll, N'') IF @lRow > 1 SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + NCHAR(13) + NCHAR(10) SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + REPLACE(@sHtmlTableRowTemplate, N'||$TblRowAllColumnsContent$||', @sHtmlTableColAll) -- Next record FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableData INTO @sAllData END -- Close cursor CLOSE cSAGHtmlHelpersGetHtmlTableData END ELSE BEGIN SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + NCHAR(13) + NCHAR(10) END -- Free cursor DEALLOCATE cSAGHtmlHelpersGetHtmlTableData END ELSE BEGIN SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + NCHAR(13) + NCHAR(10) END SET @sHtmlTableOuter = REPLACE(@sHtmlTableOuter, N'||$TblRows$||', @sHtmlTableRows) SET @sReturnHtml = @sHtmlTableOuter RETURN 0 GO <<< >>>

  • XmlHtmlEncode

    (alle Versionen/all versions) <<< String sicher für Xml/Html codieren / Encode string safely for Xml/Html (alle Versionen/all versions) Sonntag, 1. Januar 2023 Simples Beispiel zum sicheren Codieren von Strings für Xml/Html. A simple example to safely encode strings for Xml/Html. DECLARE @sValue NVARCHAR(MAX) SET @sValue = N'This is an example !' SELECT TOP 1 @sValue FOR XML PATH('') <<< >>>

  • UpdStim12

    9.0.11.x - Build 847 - 12.05.2026 <<< Sage 100 - 9.0.11.x - Update StimulSoft -> Version 2026.1.3 9.0.11.x - Build 847 - 12.05.2026 Verbesserungen Berichtsdruck AppDesigner / Improvements report printing AppDesigner Deutsch StimulSoft Bibliotheken wurden von Sage auf Version 2026.1.3 aktualisiert. Bestehende eigene Lösungen, die diese Bibliotheken referenzieren, müssen i.d.R. neu compiliert werden, sofern die Report-Instanzen von Sage-Methoden abgerufen werden. Ansonsten schlägt das Deserialisieren der Report-Instanzen im Quellcode fehl. English StimulSoft libraries have been updated to version 2026.1.3 by Sage. Existing custom solutions that reference these libraries usually have to be recompiled if the report instances are called by Sage methods. Otherwise the deserialization of the report instances in the source code fails. <<< >>>

  • Sage100IntrastatCore

    Wichtige Änderungen Intrastat Meldungen / Important changes with Intrastat reporting <<< Sage 100 Intrastat-Meldungen ab sofort über das neue .core-Verfahren möglich / Intrastat declarations now possible via the new .core procedure 24. Juni 2026 Sage Wichtige Änderungen Intrastat Meldungen / Important changes with Intrastat reporting Siehe / see https://www.officium-inservio.com/sage-100-1/intrastatcore

  • ErrorMsAccess3gEntry

    ErrorMsAccess3gEntry <<< Sage 100 Fehler "gEntry" / Error "gEntry" (alle Versionen/all versions) Montag, 27. April 2020 Deutsch Fehlermeldung/Situation Konsequenzen Mögliche Ursachen Mögliche Lösungen English Error message/situation Consequences Possibler reasons Possible solutions Deutsch Fehlermeldung/Situation Die Prozedur 'c:\Program Files (x86)\Sage\Sage 100\8.0\AddIn\Work\(AddIn-Name).gEntry' wurde von Sage 100 Warenwirtschaft nicht gefunden. Fehlercode 2517. Konsequenzen Das jeweilige MS-Access-AddIn wird nicht in der Sage 100 geladen/ausgeführt. D.h. Microsoft Access verweigert das Laden des AddIns in den MSAccess-Frontend-Prozess der Sage ERP. Mögliche Ursachen Das MS-Access-AddIn wurde von Microsoft Access / Microsoft Office als "Sicherheitsgefahr" eingestuft. In bestimmten Situationen deaktiviert Microsoft Office bestimmte AddIns, sofern diese aus Sicht Microsoft ein Problem darstellen. In diesen Fällen erscheint o.g. Fehlermeldung mit Fehlercode 2517. Mögliche Lösungen In diesen Fällen sollte man in der Windows Registry nachsehen, ob dort das AddIn als "Problemfall" eingestuft wurde: Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Access\Resiliency\DisabledItems Das AddIn muss aus dieser Liste entfernt werden. Anmerkung: Dasselbe Prinzip gilt für AddIns aus "Outlook", "Word" oder "Excel" etc. Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Resiliency\DisabledItems Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Resiliency\DisabledItems Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Excel\Resiliency\DisabledItems English Error message/situation Die Prozedur 'c:\Program Files (x86)\Sage\Sage 100\8.0\AddIn\Work\(AddIn-Name).gEntry' wurde von Sage 100 Warenwirtschaft nicht gefunden. Fehlercode 2517. Consequences The respective MS Access AddIn is not loaded/executed in the Sage 100. This means that Microsoft Access refuses to load the add-in into the MSAccess front-end process of the Sage ERP. Possibler reasons The MS Access add-in was classified as a "security risk" by Microsoft Access / Microsoft Office. In certain situations, Microsoft Office disables certain add-ins if they pose a problem from Microsoft's point of view. In these cases, the above error message appears with error code 2517. Possible solutions In these cases, you should check the Windows registry to see whether the add-in has been classified as a "problem case": Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Access\Resiliency\DisabledItems The AddIn must be removed from this list. Note: The same principle applies to AddIns from "Outlook", "Word" or "Excel" etc. Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Resiliency\DisabledItems Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Resiliency\DisabledItems Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Excel\Resiliency\DisabledItems <<< >>>

bottom of page