MEMO Data Type

Thread is closed for posting
2 posts, 1 answers
  1. Volker
    Volker avatar
    7 posts
    Member since:
    Nov 2011

    Posted 19 Mar 2014 Link to this post

    i want a field REMARKS with unlimted Text Like a MEMO Field in Access.

    When i choose STRING as Type in the DataAccess Model an update my SQL Server Database it converted this to:

    CREATE TABLE [Control] (
      [Id] int IDENTITY NOT NULL, -- _id
    [Remarks] varchar(255) NULL, -- _remarks

    Here The Text Field is limited to 256 Chars...

    Which Data Type i have to select that i can store big text Data?

  2. Answer
    Boris Georgiev
    Boris Georgiev avatar
    190 posts

    Posted 20 Mar 2014 Link to this post

    Hello Volker,

    You are selecting the correct CLR type for the Remarks property, but you should change the mapped column type. By default Telerik Data Access maps a string property to varchar(255) column.

    There are different approaches to change the default mapping:
    1) For Domain Model using Table Editor:
    1.1) From the Domain Model designer, select the class with the property.
    1.2) For the selected class, from the context menu, select "Edit Table".
    1.3) Select the property Remarks and change the SQL type to varchar(max).
    1.4) Save the Domain Model.
    2) For Domain Model using Model Schema Explorer
    2.1) Open the Domain Model and go to the Model Schema Explorer.
    2.2) From the Tables node in the tree view, go the table mapped to the class.
    2.2) Select the Remarks property and go the Properties window.
    2.3) From the SQL type property change the value to varchar(max).
    3) For Fluent Model
    3.1) Go the the Mapping configuration of the "Remarks" property.
    3.2) For the StringConfiguration, add the configuration HasColumnType("varchar").WithInfiniteLength() to the property configuration.

    I hope that helps.

    Boris Georgiev
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top