NA
Feb 9, 2022 11:24:30 AM

Messages Box Cuts Off Errors

I'm working in WinSQL and having trouble debugging syntax errors because the Messages prompt box doesn't show the entirety of the contents despite having sufficient room to do so.

When given an invalid function, it only shows [%msg: < User defined SQL function 'SQLUSER' and cuts off before showing the function name.

I left in a snippet of code doing a Left Join and got this cutoff error,  [%msg: < Input (LEFT) encountered after end of query^select

Finally I tested with two invalid column names

[%msg: < Field 'ABC' not found in the applicable tables

[%msg: < Field 'ABCDEFGHIJKLMNOPQRSTUV' not found in th

I included a picture in a Stack Overflow question I posted: https://stackoverflow.com/questions/70944351/winsql-messages-box-cuts-off-after-43-characters

This issue is code-agnostic as it occurs on a variety of scripts and with anything that is printed to the Messages box.

The monitor is an Acer V226HQL which has a resolution of 1920x1080 and I have WinSQL expanded fully so there is nothing unusual about the display setup. I can shrink the window and expand it with no change to the text cutoff. I am using WinSQL Professional Version 15.0.251.791 but it also occured in the Trial version. 

How do I get this to expand?



Synametrics support engineer
Feb 9, 2022 5:07:04 PM

Messages Box Cuts Off Errors

Try the following:

  • Open WinSQL
  • Click Edit/Options on the main menu
  • Uncheck Display Formatted Errors
  • Try reproducing the error

Let us know how it goes.



NA
Feb 9, 2022 5:22:16 PM

Messages Box Cuts Off Errors

Okay I unchecked the setting, applied it, and reproduced the issue. It was a partial success and increased the amount of characters that the error message could contain.

[Cache ODBC][State : 42S02][Native Code 30]
[C:\Program Files (x86)\Synametrics Technologies\WinSQL64\WinSQL.exe]
[SQLCODE: <-30>:<Table or view not found>]
[Location: <Prepare>]
[%msg: < Table 'SQLUSER.ABCDEFGHIJKLMNOPQRSTUV' not found>]

But there is still a hard limit that its reaching which is far before the end of the line or the size of my message box


[Cache ODBC][State : 42000][Native Code 1]
[C:\Program Files (x86)\Synametrics Technologies\WinSQL64\WinSQL.exe]
[SQLCODE: <-1>:<Invalid SQL statement>]
[Location: <Prepare>]
[%msg: < IDENTIFIER expected, reserved word WHERE found^select Account , Las



Synametrics support engineer
Feb 9, 2022 5:37:03 PM

Messages Box Cuts Off Errors

There is no limit as far as the error message goes. WinSQL tries to parse the error when that checkbox is selected. On the flip side, the message is displayed without any modification when that box is not checked.

Any chance the ODBC driver is not returning the entire message?

Try enabling ODBC trace log and send the log file to us via email (support@synametrics.com). Check https://web.synametrics.com/odbctracelog.htm for instructions.

Navigation

Social Media

Powered by 10MinutesWeb.com