November 17, 2011 at 4:43 am
I have been using .net 2 with sql compact edition 3. When I changed to windows 7 with .net 3.5
mdf created with column values (fields) inserted with additional spalces. Eg. Field Employee code will have number 101 but with additional space so that when I search for emp code where empcode =101 it will not return any values. Can someone help
January 9, 2012 at 2:55 am
It may happened due to migration. but the reason is still weird. you may go with Trim() function as a immediate solution. and try to insert new records and check still the col. gets extra spaces.
January 9, 2012 at 2:28 pm
If the column holds numeric data only the best way to deal with it is to use a numeric data type.
Based on what I know the engine (even with Compact Edition although I'm not an expert) should trim any trailing spaces when doing a comparison. Are you doing the comparison with SQL or in .NET once you've loaded the data?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply