Hi
I have a customer with a VB6 application with a SQL 2005 database.
The VB6 application sits on different servers to the SQL server.
They migrated their servers at the weekend from Windows Server 2003 32 bit to Windows Server 2003 64 bit. The SQL was upgraded from MSDE2000 to 2005 standard edition 64 bit.
They have reported the following error on one process:
Microsoft OLE DB Provider for SQL Server
Incorrect syntax near 'END'
Here's the line of VB code that causes the error
rstNotes..Open strSP, gcnnConn, adOpenStatic, adLockReadOnly, adCmdStoredProc
strSP is set as:
strSP = "up_parmsel_SINNotes (" & CStr(lngSINExtractID) & ")"
I find that if I rerun the SQL script that created the stored procedure it works OK without error a few times. And then it comes back. I can not pin point when it comes back. I'm pretty sure it's not data specific.
The SQL script that creates the stored procedure is
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[up_parmsel_SINNotes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure dbo.up_parmsel_SINNotes
GO
CREATE PROCEDURE dbo.up_parmsel_SINNotes
@SINExtractID INT AS
BEGIN
SELECT MAX(vcNote) AS vcNote, MAX(CASE btMandatory WHEN 1 THEN 1 ELSE 0 END) AS btMandatory
FROM dbo.tblSINLinesExtract
WHERE SINExtractID = @SINExtractID
GROUP BY intSINID
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
When the user reports the error I find I am able to execute the stored procedure without error from within SQL Management Studio on the server which hosts the SQL database itself.
They have not reported any problems with any of the other numerous database scripts called by the VB app.
Any ideas?
I have a customer with a VB6 application with a SQL 2005 database.
The VB6 application sits on different servers to the SQL server.
They migrated their servers at the weekend from Windows Server 2003 32 bit to Windows Server 2003 64 bit. The SQL was upgraded from MSDE2000 to 2005 standard edition 64 bit.
They have reported the following error on one process:
Microsoft OLE DB Provider for SQL Server
Incorrect syntax near 'END'
Here's the line of VB code that causes the error
rstNotes..Open strSP, gcnnConn, adOpenStatic, adLockReadOnly, adCmdStoredProc
strSP is set as:
strSP = "up_parmsel_SINNotes (" & CStr(lngSINExtractID) & ")"
I find that if I rerun the SQL script that created the stored procedure it works OK without error a few times. And then it comes back. I can not pin point when it comes back. I'm pretty sure it's not data specific.
The SQL script that creates the stored procedure is
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[up_parmsel_SINNotes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure dbo.up_parmsel_SINNotes
GO
CREATE PROCEDURE dbo.up_parmsel_SINNotes
@SINExtractID INT AS
BEGIN
SELECT MAX(vcNote) AS vcNote, MAX(CASE btMandatory WHEN 1 THEN 1 ELSE 0 END) AS btMandatory
FROM dbo.tblSINLinesExtract
WHERE SINExtractID = @SINExtractID
GROUP BY intSINID
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
When the user reports the error I find I am able to execute the stored procedure without error from within SQL Management Studio on the server which hosts the SQL database itself.
They have not reported any problems with any of the other numerous database scripts called by the VB app.
Any ideas?