The problem we are currently experiencing is bizzare to say the least. Some background info;
The SQL Server 2000 databse provides recipe and material management facilities to a SCADA application (Wonderware's InTouch v7.1). This particular problem involves a VERY simple stored-proc and table combination, the table consists of 2 columns, Created as follows;
"CREATE TABLE [dbo].[Bins_Sources_T] (
[iBinNumber] [int] NOT NULL ,
[sSourceName] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO "
The stored-proc is also simple, created as follows;
"SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE BinsSources_ListSelection_SP
@iBin int
AS
-- NB return column names for bind list Util_ListBox_IntMsg
SELECT iBinNumber As iItemNumber, sSourceName AS sItemDesc FROM Bins_Sources_T
WHERE iBinNumber = @iBin
ORDER BY sSourceName
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
"
THE PROBLEM: the stored-proc returns a recordset of possible sources for the bin number provided in the argument @iBin. This works fine from SQL Query Analyser, but when triggering the proc from the SCADA application the proc resturns zero records.
All the obvious things have been checked, i.e. the stored-proc call contains the correct bin number, records exist for that bin in the table, but for some reason from certain PC's ( we have one working fine and another not - both running the same SCADA application and both with identical ODBC connection set-up) here in the office, the SELECT statement returns no records from the table.
Modifying the stored-proc to grab an integer and string recordset from another table in the database works fine. Modifying the stored-proc to return the argument supplied and a test string on the faulty system also works fine.
This problem first occurred on our customer's site, I managed to recreate the problem on my own PC by executing the in-built stored procedure "sp_changeobjectowner" on the table in question, changing the table owner from dbo to "intouch" and then back again. It's as if some kind of trust has been lost (I am now at clutching-at-straws point).
As I said earlier - BIZARRE! - can anyone out there think of possible causes and more importantly the remedy to this oddball problem?
Many thanks
The SQL Server 2000 databse provides recipe and material management facilities to a SCADA application (Wonderware's InTouch v7.1). This particular problem involves a VERY simple stored-proc and table combination, the table consists of 2 columns, Created as follows;
"CREATE TABLE [dbo].[Bins_Sources_T] (
[iBinNumber] [int] NOT NULL ,
[sSourceName] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO "
The stored-proc is also simple, created as follows;
"SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE BinsSources_ListSelection_SP
@iBin int
AS
-- NB return column names for bind list Util_ListBox_IntMsg
SELECT iBinNumber As iItemNumber, sSourceName AS sItemDesc FROM Bins_Sources_T
WHERE iBinNumber = @iBin
ORDER BY sSourceName
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
"
THE PROBLEM: the stored-proc returns a recordset of possible sources for the bin number provided in the argument @iBin. This works fine from SQL Query Analyser, but when triggering the proc from the SCADA application the proc resturns zero records.
All the obvious things have been checked, i.e. the stored-proc call contains the correct bin number, records exist for that bin in the table, but for some reason from certain PC's ( we have one working fine and another not - both running the same SCADA application and both with identical ODBC connection set-up) here in the office, the SELECT statement returns no records from the table.
Modifying the stored-proc to grab an integer and string recordset from another table in the database works fine. Modifying the stored-proc to return the argument supplied and a test string on the faulty system also works fine.
This problem first occurred on our customer's site, I managed to recreate the problem on my own PC by executing the in-built stored procedure "sp_changeobjectowner" on the table in question, changing the table owner from dbo to "intouch" and then back again. It's as if some kind of trust has been lost (I am now at clutching-at-straws point).
As I said earlier - BIZARRE! - can anyone out there think of possible causes and more importantly the remedy to this oddball problem?
Many thanks