开发者

Incorrect error messages in FB2.1

开发者 https://www.devze.com 2022-12-13 23:38 出处:网络
I have FB1.5 and FB2.1 installed in my computer. I´ve written a script to swich from one instance to another. It runs all ok, I a开发者_如何学Pythonccess FB1.5 and 2.1 databases normally.

I have FB1.5 and FB2.1 installed in my computer. I´ve written a script to swich from one instance to another. It runs all ok, I a开发者_如何学Pythonccess FB1.5 and 2.1 databases normally.

My issue is, when I´m running 2.1 the error messages are incorrect, the following example illustrates the problem

Invalid token.
Dynamic SQL Error.
SQL error code = @1.
Token unknown - line @1, column @2. 

It is clear to me that FB has this message and somewhere it replaces the @1 @2 with real information. My question is, what is broken that is preventing FB from replacing @1 and @2 correctly?


useful link about Firebird and multiple server

  • for switching
  • for running multiple instance

I think second way is better but both works.


Check the firebird.msg file. Firebird 2.1 must not be using the message file from version 1.5.
Both server and client need to see the correct version.


The error messages format was recently changed, so you can expect this problem happening if you are using tools from newest FB versions and have an old firebird.msg installed (or vice-versa). In Windows, seems that Firebird tools will search for firebird.msg looking at the registry key.


Another reason of this situation is using old client library with new server (ie using v2.0.x client with v2.5.x server). Notice that firebird installer may copy client library also into %WINDIR% (%WINDIR% is C:\WINDOWS default) with name of fbclient.dll or gds32.dll depend on your installing options.


I solved it by deleting the file C:\Program Files (x86)\HK-Software\firebird.msg. Now it complains about a missing firebird.msg file but it formats the error message correctly despite it.

0

精彩评论

暂无评论...
验证码 换一张
取 消