If UserName="" then I want to pass to SQL Server DBNull rather than "". In SQL Stored Procedure it looks for where @UserName is null. In SQL Stored Procedure it doesn't work the same when I look for @UserName="".
FROM User INNER JOIN Email ON User.UserID = Email.UserID
WHERE (User.Deleted = @deleted)
AND (@UserName is null OR User.UserName LIKE @UserName + '%')
How can I set UserName object to be DBNull and not "". VB
.NET code is preferred. Thank you.