Hello everyone.
I'm learning ASP.NET and in the process I need to learn ADO.NET; The
syntax for defining and using a SQL query that makes use of parameters
seems really difficult to me, so I hope I'm actually missing something.
This is what I'm doing now:
procedure Test;
var X:FbCommand;
begin
X := FbCommand.Create('SELECT * FROM TAB WHERE ID=?', Connection,
Transaction);
X.Parameters.Add('', DbType.&String).Value := '7';
X.ExecuteReader; // etc
end;
This is strange to me because it forces me to use "?" marks for
parameters (difficult to maintain) and it forces me to refer to those
parameters by POSITION (difficult to maintain). In the Win32 world I
would have used named parameters and that's really easy to maintain.
Am I missing something? I sure hope I'm missing something...
Thanks,
Cosmin Prund
_______________________________________________
Delphi-DB mailing list
[email protected]
http://www.elists.org/mailman/listinfo/delphi-db