Sap.Data.Hana.HanaException: 'Parameter/Column (4) not bound.'
See original GitHub issueI’ve using linq2db for SapHana and when I’ve updated to linq2db version 2.x there is an issue with an query. When I revert to linq2db version 1.10.2, my query works again.
Exception message: 'Parameter/Column (3) not bound.'
Stack trace: at Sap.Data.Hana.HanaCommand._ExecuteReader(CommandBehavior commandBehavior, Boolean isExecuteScalar, Boolean isBeginExecuteReader)
at Sap.Data.Hana.HanaCommand.ExecuteReaderBatch(CommandBehavior behavior)
at Sap.Data.Hana.HanaCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior) in C:\projects\linq2db\Source\LinqToDB\Data\DataConnection.cs:line 1227
at LinqToDB.Data.DataConnection.QueryRunner.ExecuteReader() in C:\projects\linq2db\Source\LinqToDB\Data\DataConnection.QueryRunner.cs:line 445
at LinqToDB.Linq.QueryRunner.<ExecuteQuery>d__9`1.MoveNext() in C:\projects\linq2db\Source\LinqToDB\Linq\QueryRunner.cs:line 320
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at linq2dbHanaTest.Program.Main(String[] args) in C:\Users\user\source\repos\linq2dbHanaTest\linq2dbHanaTest\Program.cs:line 36
Steps to reproduce
Execute the query.
using (var db = new SboDataConnection(connectionString, ProviderName.SapHana))
{
var query =
db.OITM.Where(x =>
(x.validFor.Equals("Y") && (x.validFrom == null || x.validFrom <= dateTime) && (x.validTo == null || x.validTo >= date)) ||
(x.frozenFor.Equals("Y") && (x.frozenFrom == null || x.frozenFrom <= dateTime) && (x.frozenTo == null || x.frozenTo >= date)) ||
(x.frozenFor.Equals("N") && x.validFor.Equals("N"))
).Select(x => new
{
Code = x.ItemCode,
Name = x.ItemName
});
query.ToList();
}
Environment details
linq2db version: 2.6.2 Database Server: Hana 1.00 Database Provider: Sap.Data.Hana.v4.5 Framework version: .NET Framework 4.7.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
.net - Parameter/Column (2) not bound Exception when ...
I'm creating a C# application which connects to SAP HANA 2.0 database. In my pc I installed HDBODBC and HDBODBC32 driver, both of...
Read more >ADO.NET Hana client in Microsoft IIS Security Exception
Hi,. I am trying since one year to use the Hana client (currently version 2.6.64.0) for .Net Framework in a c# application that...
Read more >"authentication failed" when connecting to SAP HANA ...
I've installed HANA Express Edition 2 in a virtual machine running on Windows 10 in Virtualbox. I successfully connected Eclipse to the ...
Read more >Error: Fields not Bound.
Hi, I have developed Z UI Comopnent and facing Error on UI screen for each filed 'Filed not Bound'. Below are the steps...
Read more >SAP HANA Client Interface Programming Reference
This guide describes how to use the SAP HANA database clients for connecting applications. SAP HANA Client Interface Programming Reference.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@MichielDG, yes. Preparing fix now. It will be in next minor update, I think next Thursday.
Fixed by #1530