question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sap.Data.Hana.HanaException: 'Parameter/Column (4) not bound.'

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sdanylivcommented, Jan 11, 2019

@MichielDG, yes. Preparing fix now. It will be in next minor update, I think next Thursday.

0reactions
MaceWinducommented, Jan 13, 2019

Fixed by #1530

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found