> ' If we have some parameters > While loEnumerator.MoveNext > loDataParameter = loEnumerator.Current > > loDataParameterSQLClient = loEnumerator.Current > lcValue = loDataParameterSQLClient.Value.ToString > > ' Based on the type > Select Case loDataParameterSQLClient.SqlDbType.ToString > > ' Integer, Binary > Case "Int", "Binary" > > ' String > Case "VarChar" > lcValue = "'" + oApp.SQLServerGetValueForInsertionInScript(lcValue) + "'" > > ' Datetime > Case "DateTime" > ldDate = loDataParameterSQLClient.Value > lcValue = "'" + ldDate.Year.ToString + "-" + _ > ldDate.Month.ToString.PadLeft(2, "0") + "-" + _ > ldDate.Day.ToString.PadLeft(2, "0") + " " + _ > ldDate.Hour.ToString.PadLeft(2, "0") + ":" + _ > ldDate.Minute.ToString.PadLeft(2, "0") + ":" + _ > ldDate.Second.ToString.PadLeft(2, "0") + "'" > > ' String > Case "NVarChar" > lcValue = "'" + oApp.SQLServerGetValueForInsertionInScript(lcValue) + "'" >>
declare @Tmp table ( Id int IDENTITY(1,1) NOT NULL, MD5 binary(16) not null ); insert into @Tmp (MD5) values (0xB3C54EFB6C02017046905007293650B1); insert into @Tmp (MD5) values (0xB3C54EFB6C02017046905007293650B2); declare @MD5 Binary(16); SET @MD5 = 0xB3C54EFB6C02017046905007293650B2; select * from @Tmp where (MD5 = @MD5);