I keep receiving the following error when using DbLinq with Ingres:
Ingres.Client.IngresException: Local variable/parameter ':????' can
only be used within a database procedure.
Two examples are shown below:
1.
public CuST GetSingleCustomer(int id)
{
return _db.CuST.SingleOrDefault(c => c.CuSTId == id);
}
In this case local variable parameter is "id"
2.
public CustomerDetailModel GetCustomerRecord(string custTag)
{
var custRecord = (
from c in _db.GetTable<CuST>()
join s in _db.Segment on c.SegmentNo equals
s.SegmentNo
join ci in _db.CuSTInfo on c.CuSTCode equals
ci.CuSTCode
join co in _db.Coverage on ci.CoverageNo equals
co.CoverageNo
where c.CuSTTag == custTag
select new CustomerDetailModel
{
custAccountNo = c.CuSTTag,
custName = c.CuSTName,
custCreditRate = c.CuSTCreditRate,
custMarket = s.SegmentName,
custSize = ci.CuSTInfoCuSTTurnover,
custCoverage = co.CoverageName
}).FirstOrDefault<CustomerDetailModel>();
return custRecord;
}
In this case the local variable is "custTag"
Does anyone know how to get around this with Ingres, it appears to
work fine with SQL Server.
If I replace custTag with "AA01102" for example the query works fine,
however I need this to work with a variable name as its a bit of a
nuisance pulling back the same record all the time :)
Thanks,
Paul
--
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en.