protected virtual SqlStatement CreateSqlStatement(MembershipProviderSqlStatement command)
        {
            SqlText sql = new SqlText(Statements[command], ConnectionStringSettings.Name);

            sql.Command.CommandText = sql.Command.CommandText.Replace("@", sql.ParameterMarker);
            if (sql.Command.CommandText.Contains((sql.ParameterMarker + "ApplicationName")))
            {
                sql.AssignParameter("ApplicationName", ApplicationName);
            }
            sql.Name = ("VSM Application Membership Provider - " + command.ToString());
            sql.WriteExceptionsToEventLog = WriteExceptionsToEventLog;
            return(sql);
        }
 public override Image UserPictureImage(MembershipUser user)
 {
     using (SqlText sql = new SqlText("SELECT gpu.Picture FROM Grid_Persona_Usuario_V gpu WHERE gpu.UserName = @UserName"))
     {
         sql.AssignParameter("@UserName", user.UserName);
         if (sql.Read())
         {
             byte[] value = (byte[])sql["Picture"];
             if (value != null)
             {
                 return(Image.FromStream(new MemoryStream(value)));
             }
         }
     }
     return(base.UserPictureImage(user));
 }