Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4125100
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:49:32+00:00 2026-05-20T23:49:32+00:00

Not quite sure what’s going on here but it seems as though Microsoft always

  • 0

Not quite sure what’s going on here but it seems as though Microsoft always comes out with the coolest frameworks (in theory) and then leaves no support. Anyone out there that can help me I will be VERY greatful. This one has had me stumped for two days now and I still cannot figure it out. Here’s the setup:

  1. Visual Studio 2010 Professional (or Express for that matter, I’ve tried both)
  2. SQL Server Compact Edition 4 (or Express for that matter, I’ve tried both)
  3. Create New Project, add new model (I called mine BlogModels.cs)
  4. Add a new class called Post and give it properties as shown below…

    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Data.Entity;
    using System.ComponentModel.DataAnnotations;
    
    namespace MVC3BlogEngine.Models
    {
        public class Post
        {
            public int ID { get; set; }
            [Required]
            public string Title { get; set; }
            [Required]
            [DataType(DataType.MultilineText)]
            public string Text { get; set; }
            public DateTime PublishDate { get; set; }
        }
    }
    
  5. Run project, browse to model (/Posts) and attempt to add a new post. If I enter more than say 128 characters, an exception is thrown:

    Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.

So, what gives? I go look at the database that it created (which I think is the coolest thing since sliced bagels) and see that the column that it created was a nvarchar(128). So, my first thought was that even though I told it to use MultilineText as the datatype, it didn’t generate a column properly (not good MS). So, I changed the datatype to text and tried again. No luck.

Anyone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:49:33+00:00Added an answer on May 20, 2026 at 11:49 pm

    Well, it would seem that at last resort of removing the attribute of the datatype resolved the issue. The only reason I had it in there to start with was because of Scott Hanselman’s video blog entry on creating an MVC3 Blog and he used the attribute in his example (November 2010) and MVC3 was still in development. So, FYI, DataType.MultilineText will not allow you to enter over 128 characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not quite sure what's going on, but several issues are occurring on our
Not quite sure what's going sideways here. The below function should clear all the
I'm not quite sure how to put this, but here goes... The css clip
Not quite sure how to ask or define this, but can't figure it out.
Not quite sure how to explain this but here goes. I have a function
Im not quite sure what I am doing wrong here, I have folloed the
I'm not quite sure how indexes works. Here's how I understood it, please correct
I'm not quite sure how it works but what I need to do is
I'm not quite sure the best way to deal with this situation. Here's a
Not quite sure if it is ok to do this but, my question is:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.