Upon application output of this i can see that the sql string is missing the parameters specified within the search
select distinct fabriccondition3186.fc_id from fabric_condition fabriccondition3186 left outer join component_detail componentdetail6564 on fabriccondition3186.cd_id=componentdetail6564.cd_id where componentdetail6564.cd_plant = ? and componentdetail6564.cd_complex = ?
This is how Servoy works. It sends prepared statements to the back-end database. So the SQL is exactly that.
You could make a method that takes the SQL and the params and places them in the SQL string. If I remember correctly someone already did this, should be somewhere on this forum.
I am still receiving the same error with the inclusion of the $param check.
Error loading primary key data, No value specified for parameter 1
> com.servoy.j2db.dataprocessing.DataException: No value specified for parameter 1
[DFA]
select distinct fabriccondition1490.fc_id from fabric_condition fabriccondition1490 left outer join component_detail componentdetail1565 on fabriccondition1490.cd_id=componentdetail1565.cd_id where componentdetail1565.cd_plant = ?
Is it the case that we always have to manually concatenate params into getsql result? this seems very longwinded.
From previous suggestions this is not how getsql is supposed to function, why does servoy not recognise the paramaters?
Maybe Servoy could jump in here and clarify.
You are creating an sql string and when you pass this into controller.loadRecords() you need to pass in an array of args that is the same size as the number of question marks in the string.
So if you get part of the string you create from databaseManager.getSQL() you need to add the matching parameters as weel.