Stored procedure added under tables schema section.
It contains one parameter called ‘@Something’.
FireDac fails saying
“TryGetSomething: Exception EROUnregisteredServerException in module Test.exe at 00000000015C4125.
[FireDAC][Phys][ODBC][Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function ‘SomethingGetOne’ expects parameter ‘@Something’, which was not supplied.”
The parameter was specified on the TDAMemTable as “Something”.
It seems it is not including the ‘@’ when sending it to the db.
function TDASchema.DoNewDataset(const aRec: PDASchemaExchange;
aStatementName: string; OpenIt: boolean; aConnectionType:String): IDADataset;
var
s: string; //added
i:Integer; //added
..
aRec^.lFields := ds.Fields;
// begin changes
case aRec^.lstatement.StatementType of
stAutoSQL: begin
if aRec^.lstatement.TargetTable = '' then begin
if aRec^.lstatement.Name = '' then
lstatname:= '['+aRec^.lstatement.ConnectionType+']'
else
lstatname:= aRec^.lstatement.Name;
DAError(True,err_StatementSTargetTableMustBeSpecified,[aRec^.lName,lstatname])
end;
sql := GenerateSelectSQL(aRec);
end;
stStoredProcedure: begin
sql := aRec^.lConnection.GetSPSelectSyntax(ds.Params.Count > 0);
sql := StringReplace(sql,'{0}', aRec^.lstatement.SQL, [rfReplaceAll]);
s:= '';
for I := 0 to ds.Params.Count-1 do begin
if s <> '' then s := s+', ';
s := s + ':'+ds.Params[i].Name;
end;
sql := StringReplace(sql,'{1}', s, [rfReplaceAll]);
end;
end;
// end changes
if Assigned(fOnGetSQL) then fOnGetSQL(Self, aRec^.lName, setDataset, sql);
after changes, you may launch install_DA.cmd from C:\Program Files (x86)\RemObjects Software\Build for recompiling IDE packages