Passed parameters are silently ignored.
Andrus.
> _db.ExecuteCommand("UPDATE Products SET ProductName={0}", "NewName");
This other page also wrote directly that string.Format() method is used to
replace {0}, {1} etc with parameters like :p0 , :p1
It seems that Format() is used to pre-process strings to create ADO .NET
syntax string with parameters :p0, :p1 etc.
There is probably typo or my misunderstanding in MSDN which describes that
parameter numbering starts with 1: {1}
MSDN samples seems to start parameters with {0}.
Andrus.
> Anrus, please sync. This should be working now.
Thank you.
I tried ExecuteCommand in rev. 198 in PostgreSQL
I need to pass table name as parameter to sql command.
Got exception
Message="ERROR: 42601: syntax error at or near \"'klliik'\""
ErrorSql="select count(*) from 'klliik'"
PostgreSQL needs double quotes to quote identifiers.
DbLinq sends single quotes: 'klliik'
This is probably by design: It is not possible to use parameters for table
names.
So I will continue to use string builder to generate my queries which
require table names as parameters.
Btw. Have you looked to my composite key unit tests ?
Andrus.