.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

BLANK characters causing issues when FILTERING

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server

I am trying to filter a table in SSRS 2005, which i created in TSQl..

The problem i get is that the fields have loads of blank spaces at the end of each field, like shown below

"Apple                       "

I use a INSERT INTO script to place Apple into the field... can i do this another way so it wont any space, below is my current script.


INTO dbo.myTable
SELECT 'Apple', 'Fruit', +

View Complete Post

More Related Resource Links

IE 8 Issues with Chinese/Japanese Characters


On my web application, I display information in different languages. Everything works fine in IE compatibility mode and FireFox but it shows boxes for chinese/japanese languages. I am pretty much having the same issue as described here



Thanks for your help.

Today() Function including timezone causing issues in Analysis Services

I'm using Reporting Services 2008 R2 connecting to Analysis Services. I've used this same code without issues before (pre R2), just wondering whether it is an RS, AS, Server or some other issue entirely. I have a report with a datetime parameter @vdtmDate (I use this so the user has the date picker instead of a drop down list of dates) with default =DateAdd(DateInterval.Day, -1, Today()) Then in the MDX for the dataset, I use the following to build the filter. SET [Today] as STRTOSET('[Calendar].[Reporting Week].[Day].&[' + VBA.FORMAT(VBA.CDATE(@vdtmDate),'yyyyMMdd') + ']') The issue I'm having is when the report runs with the default parameters, the value passed to Analysis Services includes the timezone which causes the query to process for the previous day to that selected. When the user runs the report manually (ie just pressing the view report button straight after the initial report load) the date passes without the timezone and returns the correct information. Example, running the report today (3rd September), the default parameter passes the value (info from profiler)         <Parameter>           <Name>vdtmDate</Name>           <Value xsi:type="xsd:dateTime">2010-09-02T00:00:00+

Filtering Special Characters Quickly From A String

I need to only allow (basically every key that you can see on the keyboard) and drop the rest. I would probably use a regular expression to do this but Im not that great with them at this time. Does anyone have an example of how to do this?

Foreign characters causing a duplicate attribute key error - how to avoid?

Greetings, We have a data warehouse into which we import data obtained from our outside vendors.  The data are then used to build data cubes.  Lately we have started to get a duplicate key error on the "County" attribute in our "Location" dimension.  The problem appears to be caused by these two values returned by the query that returns the distinct list of counties: Spree-Neisse Spree-Neiße These are German counties and they are really the same county, I believe.  Our data warehouse stores County as a varchar.  If I cast the stored value as nvarchar, the query that returns the distinct list of counties returns only the 2nd value and so should avoid the duplicate key error.  (I haven't tried it yet, just speculating.) This post suggests the root cause of the problem: http://ssas-musings.blogspot.com/2009/11/duplicate-key-error.html We don't have any control over the data before our vendors give it to us, and it comes from all over the world.  What is the best way to avoid occurrences of the duplicate attribute key error?  Should we be storing all our character data as nvarchar?  Would it be enough to cast the stored data as nvarchar when the cubes are being built?  Is there a better approach?  I'd like to get an idea of what the best practice would be.  Our warehouse

SharePoint group name duplicacy causing issues in target audience


We are editing the target audience property of a document in a library. We have multiple SharePoint groups like the following



In PeoplePicker, both the above groups are found. If I select the first one, and come back we get Found No Matches and it tells that more than one group are present. If I select one of them and save, when I come back to check via view properties, the Target Audience property is blank.

This kind of problem is present in many internet posts, but I did not see any clear resolution. Is it a result of any recent windows patch?


Linked Cube - Issues with filtering members through Excel


I've got a linked cube, which is pointing to a MOLAP cube. (SSAS 2008)

The cube has a parent child hierarchy on one of the dims.


In excel I create 2 pivot tables for balancing purposes:

1 - Pointing to the normal cube.

2 - Pointing to the linked cube (which is in turn pointing to the same cube as in 1).


Now I included a measure, and a filter which is fine.


The problem I have, is when I add the parent-child dim to rows on both pivots and then try and filter to select only 1 of the members the pivot ignores me and returns all of the members.


The strange thing is that it works perfectly on the pivot that is based on the normal cube.

But it won't work on the linked cube.


Does anyone know what's going on?

Initially I thought that excel had some kind of bug, but then why would it work on a non-linked cube?








GridView Filtering In ASP.NET

In this tutorial you will learn how to add a filter to a Grid View Control, To modify the query with a parameterized filter, the WHERE Clause, Parameter properties, Parameter Value Editor and To test filtering.

Problem Cleaning Illegal Characters out of an XML String



I'm trying to strip illegal characters out of an XML string before I send it off to a public web service.  The xml will look something like this:

<field name="first_name">George</field>
<field name="last_name">Harrison</field>
<field name="notes">This is a note.  Any character could appear here</field>

I need to pull out any ampercand (&) charachters in the any of the fields, as well as any < or > characters, which would make the XML unreadable.

I've tried it like this:

Private Shared Function cleanQuery(ByVal queryNode As String) As String 
    Dim root As XElement = XElement.Parse(queryNode) 
    For Each x As XElement In root.Elements 
        x.Value = x.Value.Replace("&", "&").Replace("<", "<").Replace(">", ">") 
    Return root.ToString() 
End Function


That doesn't work so well.  I get the error stating:

     There are multiple root elements. Line 1, position 15.

I tried wrapping the XML in a single root element, like this:

Private Shared Function cleanQuery2(ByVal q

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

Store and display Japanese characters



Can anyone tell me the best way of storing Japanese characters through ASP.NET.
I have to put characters into a asp:textbox on one page, which saves it to an Access DB.
On a second page I want to display the content in a asp:label.

Should I store the characters directly to the database or should they be encoded, and
how do I encode the characters? 

In my web.config i have:

<globalization fileEncoding="ISO-2022-JP" requestEncoding="ISO-2022-JP" responseEncoding="ISO-2022-JP" culture="ja-JP" uiCulture="ja-JP" />  

On the display page I have:

<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=shift_jis">


string.Split - not all characters allowed as separator



I am working on a site where I use the Split function on a string.

To make sure I used a separator character that I do not use anywhere in the data I selected the character '£'.

This worked fine in Firefox and Safari, but in IE8 I get an 'Index out of range' error, so apparently the '£' character is not handled correctly.

I changed the separator to ';', and then it works fine.



Remove characters in a string


i have a string like this   sravani/, asdfff/, lsdsf/
i want to remove last character '/'  in the above string...
which function can i use?

pls help me....

Data Points: Deny Table Access to the Entity Framework Without Causing a Mutiny


Julie Lerman shows database administrators how to limit access to databases from the Entity Framework by allowing it to work only with views and stored procedures instead of tables-without impacting application code or alienating developers.

Julie Lerman

MSDN Magazine August 2010

Concurrency: Tools And Techniques to Identify Concurrency Issues


Efficient parallel applications aren't born by merely running an old app on a parallel processor machine. Tuning needs to be done if you're to gain maximum benefit.

Rahul V. Patil and Boby George

MSDN Magazine June 2008

CLR Inside Out: Investigating Memory Issues


Memory issues can manifest in a wide variety of ways. This column shows you how to collect the data you need to determine what types of mem¬ory issues you are experiencing.

Claudio Caldato and Maoni Stephens

MSDN Magazine November 2006

Stress Testing: Custom LoadGenerator Tool Identifies the Issues Your Application Faces Under Stress


It's easy to postpone stress testing when developing an application, and it's easy to forgo it altogether. Having an easy-to-use framework at your fingertips to conduct these tests can make the task far less painful. This article walks you through an application that eases the task of generating load for a variety of layers within an application.

Brian Otto

MSDN Magazine April 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend