This is a migrated thread and some comments may be shown as answers.

MEMO Data Type

1 Answer 170 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Volker
Top achievements
Rank 2
Volker asked on 19 Mar 2014, 02:23 PM
Hy,
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?

br
Volker

1 Answer, 1 is accepted

Sort by
0
Accepted
Boris Georgiev
Telerik team
answered on 20 Mar 2014, 08:51 AM
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.

Regards,
Boris Georgiev
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Databases and Data Types
Asked by
Volker
Top achievements
Rank 2
Answers by
Boris Georgiev
Telerik team
Share this question
or