When I run the following .Net code:
using (var c = Shared.DataSources.BSS1.CreateCommand())
{
c.CommandText = \"\\r\\nSelect c1, c2, c3, rowid \\r\\nFrom
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);