This thread is in reference to thread 766-842225. "Query Engine Error: '22018:[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value '%' to a column of data type int.'"
Tom (misuser), how did you solve the problem?
A bit of background. I have a report based off of a SQL Server 2000 Stored Procedure. The report is written in CR 9 with SP2 applied. The stored procedure has only varchar parameters and there is no use of the nvarchar data type and there is no implicit conversion to data type int. Upon inspection of the SQL Profiler it appears to me that Crystal is calling other system procedures before calling the stored procedure that the report is based on. The stored procedure which I believe is causing problems is the following call "exec sp_sproc_columns N'ReportAttendanceTracking;1', N'%', NULL, NULL, @ODBCVer = 3" Notice the N'%'. The N tells SQL Server that this parameter is nvarchar data type.
The strange thing is that if I execute this report in a Windows 2003 environment the error does not show itself but in a Windows 2000 environment it does. I am aware that the level of MDAC is different and that might solve the problem. The issue I have with updating the MDAC level is that I have other reports based off of stored procedures and they execute with no problem leading me to ponder that there is an issue with my stored procedure. But why would the same stored procedure work when called from a Win 2003 machine?
Could Tom (misuser) or anyone else shead some light? I am open to suggestions as to how to isolate the problem even if you don't have the complete answer.
Thank you
Fred
Tom (misuser), how did you solve the problem?
A bit of background. I have a report based off of a SQL Server 2000 Stored Procedure. The report is written in CR 9 with SP2 applied. The stored procedure has only varchar parameters and there is no use of the nvarchar data type and there is no implicit conversion to data type int. Upon inspection of the SQL Profiler it appears to me that Crystal is calling other system procedures before calling the stored procedure that the report is based on. The stored procedure which I believe is causing problems is the following call "exec sp_sproc_columns N'ReportAttendanceTracking;1', N'%', NULL, NULL, @ODBCVer = 3" Notice the N'%'. The N tells SQL Server that this parameter is nvarchar data type.
The strange thing is that if I execute this report in a Windows 2003 environment the error does not show itself but in a Windows 2000 environment it does. I am aware that the level of MDAC is different and that might solve the problem. The issue I have with updating the MDAC level is that I have other reports based off of stored procedures and they execute with no problem leading me to ponder that there is an issue with my stored procedure. But why would the same stored procedure work when called from a Win 2003 machine?
Could Tom (misuser) or anyone else shead some light? I am open to suggestions as to how to isolate the problem even if you don't have the complete answer.
Thank you
Fred