Start a new topic

Support Error Line Numbers for Official MSSQL JDBC Driver

Hello,


I searched the forums and found several older threads requesting this, and the responses all noted that at least at the time, the open source jTDS driver didn't support error line numbers.


Whether recently or in the past it was updated, the official Microsoft driver for JDBC does indeed support line number fetching for errors. From the JDBC Documentation:


SQLServerError.getLineNumber() returns the line number within the Transact-SQL command batch or stored procedure that generated the error.

https://docs.microsoft.com/en-us/sql/connect/jdbc/handling-errors?view=sql-server-2017

It would be extremely beneficial for DbVisualizer to add this support to the client at the least for use with the official JDBC driver (of which DbVisualizer has a default inbuilt profile for). 


Right now, any time we have code with an error, we have to switch over to SSMS for our mssql servers in order to determine where in the code the error has occurred.

Sorry if this is a repeat request, but as of current I am unable to get line numbers to be displayed/highlighted for where errors occurred using the official driver.


1 person likes this idea

Carl,


Thanks for the heads up. I will open a ticket.


Regards


Roger

This would be extremely helpful. I'm using DbVis to query a Vertica instance, and I have very long queries to work with. When these break, it's incredibly hard to find the error location without a line number.

Adrian,


The problem with Vertica is that the error positions reported by the JDBC driver does a poor job when the executed SQL statement contains whitespaces and newline sequences. 


We will open a ticket with Vertica to see if this can be improved.


Regards


Roger

Login or Signup to post a comment