--- title: "onError Event (RDS) | Microsoft Docs" ms.prod: sql ms.prod_service: connectivity ms.technology: connectivity ms.custom: "" ms.date: "01/19/2017" ms.reviewer: "" ms.topic: conceptual apitype: "COM" helpviewer_keywords: - "onError event [ADO]" ms.assetid: b01cbc62-fbd7-4068-b16c-8b0f80a05887 author: MightyPen ms.author: genemi --- # onError Event (RDS) The **onError** event is called whenever an error occurs during an operation. > [!IMPORTANT] > Beginning with Windows 8 and Windows Server 2012, RDS server components are no longer included in the Windows operating system (see Windows 8 and [Windows Server 2012 Compatibility Cookbook](https://www.microsoft.com/download/details.aspx?id=27416) for more detail). RDS client components will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to [WCF Data Service](https://go.microsoft.com/fwlink/?LinkId=199565). ## Syntax ``` onError SCode, Description, Source, CancelDisplay ``` #### Parameters *SCode* An integer that indicates the status code of the error. *Description* A **String** that indicates a description of the error. *Source* A **String** that indicates the query or command that caused the error. *CancelDisplay* A **Boolean** value, which if set to **True**, that prevents the error from being displayed in a dialog box. ## Applies To [DataControl Object (RDS)](../../../ado/reference/rds-api/datacontrol-object-rds.md) ## See Also [ADO Events Model Example (VC++)](../../../ado/reference/ado-api/ado-events-model-example-vc.md) [ADO Event Handler Summary](../../../ado/guide/data/ado-event-handler-summary.md)