ORA-01460: unimplemented or unreasonable conversion requested

后端 未结 4 1506
清酒与你
清酒与你 2020-12-19 06:32

When I run the following .Net code:

using (var c = Shared.DataSources.BSS1.CreateCommand())
{
    c.CommandText = \"\\r\\nSelect c1, c2, c3, rowid \\r\\nFrom         


        
4条回答
  •  时光取名叫无心
    2020-12-19 06:57

    The accepted answer didn't work for me. However, after reading the attached links, I applied the following – although it does involve editing the SQL.

    In my case, I knew the maximum left of the bind variable (the length reducing after the first call is what causes the issue). So I padded the .NET string, and added a TRIM in the SQL. Following your example:

    c.CommandText = "\r\nSelect c1, c2, c3, rowid \r\nFrom someSpecificTable \r\nWhere c3 = TRIM(:p0)";
    ...
    p.Value = "007".PadRight(10);
    

提交回复
热议问题