SqlError::LineNumber Property

 

Gets the line number within the Transact-SQL command batch or stored procedure that contains the error.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public:
property int LineNumber {
	int get();
}

Property Value

Type: System::Int32

The line number within the Transact-SQL command batch or stored procedure that contains the error.

Line numbering starts at 1. If the value is 0, the line number is not applicable.

For more information on errors generated by SQL Server, see SQL Server Books Online.

The following example displays each SqlError within the SqlErrorCollection collection.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: