The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
SqlException::LineNumber Property
.NET Framework (current version)
Gets the line number within the Transact-SQL command batch or stored procedure that generated the error.
Assembly: System.Data (in System.Data.dll)
Property Value
Type: System::Int32The line number within the Transact-SQL command batch or stored procedure that generated the error.
The line numbering starts at 1; if 0 is returned, the line number is not applicable.
This is a wrapper for the LineNumber property of the first SqlError in the Errors property.
The following example displays each SqlError within the SqlErrorCollection collection.
.NET Framework
Available since 1.1
Available since 1.1
Show: