You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we format an error message that includes a Windows error message, we get an extra hard return and newline in the buffer (\r\n). For example, observe the blank line below between the error message and the SQL prompt (Firebird 2 release, Windows XP):
C:\workspace\vj>\fb2\bin\isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'not_there.fdb';
Statement failed, SQLCODE = -902
I/O error for file "C:\WORKSPACE\VJ\NOT_THERE.FDB"
-Error while trying to open file
-The system cannot find the file specified.
SQL>
The "The system cannot find the file specified." string is a windows error.
I believe the fix for this is to change the call to FormatMessage in src/jrd/gds.cpp. Specifically, change
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
to
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK,
I've tested this with Vulcan and it seems to do the trick.
Submitted by: Bill Oliver (verbguy)
Assigned to: Claudio Valderrama C. (robocop)
Is related to QA98
When we format an error message that includes a Windows error message, we get an extra hard return and newline in the buffer (\r\n). For example, observe the blank line below between the error message and the SQL prompt (Firebird 2 release, Windows XP):
C:\workspace\vj>\fb2\bin\isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'not_there.fdb';
Statement failed, SQLCODE = -902
I/O error for file "C:\WORKSPACE\VJ\NOT_THERE.FDB"
-Error while trying to open file
-The system cannot find the file specified.
SQL>
The "The system cannot find the file specified." string is a windows error.
I believe the fix for this is to change the call to FormatMessage in src/jrd/gds.cpp. Specifically, change
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
to
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK,
I've tested this with Vulcan and it seems to do the trick.
Commits: 87c9f2b
The text was updated successfully, but these errors were encountered: