Expand the parameters of the cmd to have a single parameter for each parameter in the
sql string
Namespace: NHibernate.DriverAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
void ExpandQueryParameters( IDbCommand cmd, SqlString sqlString ) |
Visual Basic |
---|
Sub ExpandQueryParameters ( _ cmd As IDbCommand, _ sqlString As SqlString _ ) |
Visual C++ |
---|
void ExpandQueryParameters( IDbCommand^ cmd, SqlString^ sqlString ) |
Parameters
- cmd
- Type: System.Data..::..IDbCommand
[Missing <param name="cmd"/> documentation for "M:NHibernate.Driver.IDriver.ExpandQueryParameters(System.Data.IDbCommand,NHibernate.SqlCommand.SqlString)"]
- sqlString
- Type: NHibernate.SqlCommand..::..SqlString
[Missing <param name="sqlString"/> documentation for "M:NHibernate.Driver.IDriver.ExpandQueryParameters(System.Data.IDbCommand,NHibernate.SqlCommand.SqlString)"]
Remarks
This is for databases that do not support named parameters. So, instead of a single parameter
for 'select ... from MyTable t where t.Col1 = @p0 and t.Col2 = @p0' we can issue
'select ... from MyTable t where t.Col1 = ? and t.Col2 = ?'