Some questions, guesses and suggestions What is the exact DDL SQL type for TABLE_PART_NUM. FAMILY? Did you try using OdbcType.
VarChar OdbcType. NVarChar or even OdbcType. NText instead of OdbcType.
Text? Also, please note that by default NVARCHAR2 size is in characters but VARCHAR2 is in bytes - maybe "4000" in your code is interpreted as 4000 characters exceeding the maximal field width for character data of 4000 bytes Try using 2000 or even lower number just for testing purposes Try to execute the query from the SQL Developer. Do you have any problems there?
Do you use any "unusual" character encoding in your database? You can execute SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER LIKE '%CHARACTERSET and look at NLS_CHARACTERSET for VARCHAR2 encoding and NLS_NCHAR_CHARACTERSET for NVARCHAR2 encoding What are the exact versions of your ODBC driver and Oracle server? Do they match?
Do you get this problem if you try using the equivalent ODP. NET code?
Some questions, guesses and suggestions... What is the exact DDL SQL type for TABLE_PART_NUM. FAMILY? Did you try using OdbcType.
VarChar, OdbcType. NVarChar or even OdbcType. NText instead of OdbcType.
Text? Also, please note that by default NVARCHAR2 size is in characters but VARCHAR2 is in bytes - maybe "4000" in your code is interpreted as 4000 characters, exceeding the maximal field width for character data of 4000 bytes. Try using 2000 or even lower number just for testing purposes.
Try to execute the query from the SQL Developer. Do you have any problems there? Do you use any "unusual" character encoding in your database?
You can execute... SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER LIKE '%CHARACTERSET'; ...and look at NLS_CHARACTERSET for VARCHAR2 encoding and NLS_NCHAR_CHARACTERSET for NVARCHAR2 encoding. What are the exact versions of your ODBC driver and Oracle server? Do they match?
Do you get this problem if you try using the equivalent ODP. NET code?
I suspect it's because you're using this: TABLE_CASE. CREATION_TIME > to_date(?,'MM/DD/YYYY HH:MI:SS AM') which expects a string parameter, but you're already passing in a DateTime value: FindCases.Parameters. Add(@"date", OdbcType.
DateTime, 4000). Value = date; I suspect you can just change your SQL to use: TABLE_CASE. CREATION_TIME >?
Thank you for your reply. I have tried your suggestion without luck. I've tried just "TABLE_CASE.
CREATION_TIME >? " as well as using my origional statement but changing the type to text: – DarkShadow 2 days ago @DarkShadow: You shouldn't do any string conversions you don't need to - so the change I've suggested should be your best bet, IMO. You say you tried it "without luck" - does that mean you got the same exception?
– Jon Skeet 2 days ago Yes, still getting the same exception when I change to: TABLE_CASE. CREATION_TIME >? – DarkShadow 2 days ago @DarkShadow: I think it would be worth performing a query with just CREATION_TIME in order to check that that really is the parameter causing problems - basically, simplify things until you've got the simplest possible query which demonstrates the problem, and then it'll be easier to experiment with other options.
What's the type of CREATION_TIME? – Jon Skeet 2 days ago Thanks for all the help... the date seems to be OK. I tried the same query but put in a static value for family and it works.
Has to be something with the family one but I don't know what. – DarkShadow 2 days ago.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.