System.Data.OleDb.OleDbException: Undefined function 'ConcatRelated' in expression

1

I'm working on a c# winform software, connecting to local MS Access db (.mdb)

Connection string used is Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb and it's kinda considered a requirement, Ace is not an option.

I'm trying to use the function ConcatRelated but keep encountering error: System.Data.OleDb.OleDbException (0x80040E14): Undefined function 'ConcatRelated' in expression.

My query below:

string carColumnsAndTable = "SELECT c.Id, cust.CustomerName as InsuredName, c.CarPlate as VehicleNo, c.CarMake as Make, c.CarModel as Model, c.CarYear as VehicleYear, c.CarCc as CC, c.CarChasisNumber as Chasis, c.CarEngineNumber as EngineNumber,  "
    + "ConcatRelated('d.DebtorName', 'CarDebtor cd left join Debtor d on cd.DebtorId = d.Id', 'cd.CarId = ' & [c.Id]) as Debtor "
    + "FROM ((Car as c) left join Customer as cust on c.CustomerId = cust.Id) ";

And function setup as in screenshot below:

enter image description here

Query works fine in ms access:

enter image description here

Anyone got any clue on what I should do to resolve this?

c#
winforms
ms-access
oledb
asked on Stack Overflow Dec 16, 2018 by Chor Wai Chun • edited Jun 20, 2020 by Community

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0