Print Page | Close Window

ODBC Error

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1642
Printed Date: 03 May 2025 at 12:13am


Topic: ODBC Error
Posted By: phil22046
Subject: ODBC Error
Date Posted: 07 Nov 2007 at 7:11am

I am getting an ODBC error when I use a SQL Server 2000 Stored procedure as my data source.  The error Msg is: ODBC error; [Microsoft][ODBC SQL Driver] Invalid character value for cast specification.

I can run the stored procedure in the query analyzer and I get data returned without any errors reported.   I examined my data and found no anomalies.   Also I removed all Cast conversions from the SQL and replaced with convert.  I still get the same error message.
 
The ODBC driver version is SQL Server 2000.85.1117.00
 
 



Replies:
Posted By: jkwrpc
Date Posted: 07 Nov 2007 at 1:08pm
This is  a pretty basic idea and one you likely have tried. 
 
I dont know how large your stored proc is, but you might try commenting out the individual variables (if any) and related datafields then add them back at one at a time until you find the offending problem or get a more descriptive error message.  It does seem to be in the stored proc.  If you are passing any parameters or variables to it and the data types dont convert could be a cause. Specifically data typing the parameters and variables could resolve the problem.
 
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net

 




Print Page | Close Window