Page 1 of 1
Non english Error Message
Posted: Thu 17 Aug 2006 13:53
by mac500
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 ?
Posted: Fri 18 Aug 2006 14:39
by Antaeus
Please send us (evgeniyD*crlab*com) a complete small sample that raises this error. We will try to determine who generates the error message.
Posted: Fri 18 Aug 2006 15:07
by mac500
Unfortunatelly this error is not reproducable. It happens in a big 3 tier ERP system just from time to time.
Posted: Tue 22 Aug 2006 14:07
by Antaeus
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.
Posted: Mon 28 Aug 2006 15:24
by mac500
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
Posted: Tue 29 Aug 2006 11:26
by Jackson
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.
Posted: Tue 28 Nov 2006 14:52
by auto-maniacs0
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!
Posted: Wed 29 Nov 2006 11:23
by Jackson
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.