Non english Error Message

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
mac500
Posts: 4
Joined: Thu 17 Aug 2006 13:34

Non english Error Message

Post by mac500 » Thu 17 Aug 2006 13:53

Hi, we are using dbexpsda.dll version 3.0.3.0 in an english SQL Server 2000 and english operating system (Server 2000) environment.

We get from time to time a non english (german) exception message from TSqlQueries in our application server :
'SQL Server Error: Ungültige Werte für Eingabeparameter. Weitere Informationen befinden sich in den Statuswerten.'

We checked a few DLLs like SQLOLEDB.DLL and they are all english.

Which DLLs (or other files) are involved in the communication path from the TSqlQuery object over the dbexpsda.dll up to the SQL Server 2000 which could produce this error message ?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 18 Aug 2006 14:39

Please send us (evgeniyD*crlab*com) a complete small sample that raises this error. We will try to determine who generates the error message.

mac500
Posts: 4
Joined: Thu 17 Aug 2006 13:34

Post by mac500 » Fri 18 Aug 2006 15:07

Unfortunatelly this error is not reproducable. It happens in a big 3 tier ERP system just from time to time.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 22 Aug 2006 14:07

This error message is not generated by DbxSda. Most possible it is generated by OLEDB. Try to find in what module and under what conditions this error is raised. Unfortunately we will not be able to help if we do not have enough information.

mac500
Posts: 4
Joined: Thu 17 Aug 2006 13:34

Post by mac500 » Mon 28 Aug 2006 15:24

We found the place, where the error happens. The problem seems to be the way, we set a parameter to NULL in the method SetParamOrNull(). Q.ExecSQL; produces the error in the code below. Is it possible to reproduce the problem with this information ? Are we doing something wrong ?

-- Delphi
Q.SQL.Add('update CONSIGNMENT_LINE_ITEM set '+
' QTY_ASSIGNED = ' + IntToStr(cli.QtyAssigned)+','+
'PICKLIST_NUMBER = :PN,'+
'PICKLIST_VERSION_NUMBER = :PVN,'+
'RETURN_LIST_NUMBER = :RN,'+
'RETURNLIST_VERSION_NUMBER = :RVN '+
'where CLI_NUMBER = '+IntToStr(cli.CliNumber));
SetParamOrNull(Q,'PN',cli.PickListNumber);
SetParamOrNull(Q,'PVN',cli.PickListVersionNumber);
SetParamOrNull(Q,'RN',cli.ReturnListNumber);
SetParamOrNull(Q,'RVN',cli.ReturnListVersionNumber);
Q.ExecSQL;


// Helper function to set integer parameters to null if the value is zero
procedure SetParamOrNull(Q: TCMQuery; PName: String; val: Integer);
begin

if (val = 0) or (val = -1) then
begin
Q.ParamByName(PName).Datatype := ftInteger;
Q.ParamByName(PName).Clear; // set to null
Q.ParamByName(PName).Bound := TRUE;
end
else
Q.ParamByName(PName).AsInteger := val;

end;


-- SQL tablestructure
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CONSIGNMENT_LINE_ITEM]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CONSIGNMENT_LINE_ITEM]
GO

CREATE TABLE [dbo].[CONSIGNMENT_LINE_ITEM] (
[CLI_NUMBER] [int] NOT NULL ,
[BCODE] [int] NULL ,
[OUT_CONSIGNMENT_NUMBER] [int] NULL ,
[IN_CONSIGNMENT_NUMBER] [int] NULL ,
[QTY_ASSIGNED] [int] NULL ,
[QTY_CHECKED_IN] [int] NULL ,
[QTY_PACKED] [int] NULL ,
[IS_ALLOCATED] [numeric](1, 0) NULL ,
[PICKLIST_NUMBER] [int] NULL ,
[RETURN_LIST_NUMBER] [int] NULL ,
[QTY_CHECKED_OUT] [int] NULL ,
[BOOKED_ITEM_NUMBER] [int] NOT NULL ,
[AVAILABILITY_AT_RESERVATION] [int] NULL ,
[AVAILABILITY_AT_ORDER] [int] NULL ,
[QTY_GRANTED] [int] NULL ,
[BQ_NUMBER] [int] NULL ,
[PICKLIST_VERSION_NUMBER] [int] NULL ,
[RETURNLIST_VERSION_NUMBER] [int] NULL
) ON [PRIMARY]
GO

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Tue 29 Aug 2006 11:26

Unfortunately we can not reproduce the problem using your example. We even do not get any error messages.
Please specify the script to populate table with data.
Describe more detailed TCMQuery class.

auto-maniacs0
Posts: 1
Joined: Tue 28 Nov 2006 11:37

Post by auto-maniacs0 » Tue 28 Nov 2006 14:52

mac500 wrote:Hi, we are using dbexpsda.dll version 3.0.3.0 in an english SQL Server 2000 and english operating sy...
To me all the same!

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 29 Nov 2006 11:23

We couldn't reproduce the problem.
Please send us (evgeniym*crlab*com) a complete small test project to reproduce the problem; it is desirable to use Northwind or Master schema objects, otherwise include definition of your own database objects; don't use third party components.

Post Reply