Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing "String" as "TEXT" instead of "VarChar" in SQLite - WP8

I'm storing my Data in local database using SQLite. I've string typed few variables to store. Now, when I store that string variables, it is being stored as "VARCHAR" (as in the picture below).

Picture 1

enter image description here

But I want to store those strings as "TEXT" type in SQLite. (as in the picture below)

Picture 2

enter image description here

The class I'm using to store db is as below:

public class abc
{
    [SQLite.AutoIncrement, SQLite.PrimaryKey]
    public int _id { get; set; }
    public string a { get; set; }
    public string b { get; set; }
    public string c { get; set; }
    public string d { get; set; }
    public string e { get; set; }
    public string f { get; set; }
    public string g { get; set; }
    public DateTime date { get; set; }

}

any help will be appreciated.

like image 939
Keval Langalia Avatar asked Apr 08 '14 14:04

Keval Langalia


1 Answers

varchar is TEXT in SQLite so u need not to worry!

Internally the data is always stored as TEXT, so even if you create table with VARCHAR(LEN), SQLite is going to follow the rules of TEXT data type

like image 176
Parimal Raj Avatar answered Sep 20 '22 19:09

Parimal Raj