--- title: "Handling Errors in VBScript | Microsoft Docs" ms.prod: sql ms.prod_service: connectivity ms.technology: connectivity ms.custom: "" ms.date: "01/19/2017" ms.reviewer: "" ms.topic: conceptual dev_langs: - "VB" helpviewer_keywords: - "VBScript error handling [ADO]" - "errors [ADO], VBScript" ms.assetid: 31bc3743-32d3-4bc7-ac61-ee6ed0fdec70 author: MightyPen ms.author: genemi --- # Handling Errors in VBScript There is little difference between the methods used in Visual Basic and those used with VBScript. The primary difference is that VBScript does not support the concept of error handling by continuing execution at a label. In other words, you cannot use `On Error GoTo` in VBScript. Instead, use `On Error Resume Next` and then check both **Err.Number** and the **Count** property of the **Errors** collection, as shown in the following example: ```
" & strError & "
") Next End If %> ```