Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

SQLite

sqlite

  • Please log in to reply
4 replies to this topic

#1 Tonchi

Tonchi

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 29 October 2012 - 04:29 PM

What is the technique to store List of strings in one column table in SQLite?
  • 0

Microsoft Student Partner, Microsoft Certified Professional


#2 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 29 October 2012 - 05:49 PM

Storing the whole? Serialize it and store into a big text field, i think would be easiest.
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#3 Tonchi

Tonchi

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 29 October 2012 - 06:14 PM

Storing the whole? Serialize it and store into a big text field, i think would be easiest.

If I make it as text field, how can I separate values when I want to represent them in the app?
  • 0

Microsoft Student Partner, Microsoft Certified Professional


#4 VNFox

VNFox

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 648 posts
  • Programming Language:C#, PHP
  • Learning:Assembly

Posted 29 October 2012 - 07:01 PM

List of string should be in 1 column ... just called it 'name' or 'text' ... just have multiple rows for it. If you need linking ... then create linking index. It's not good to store text with delimiter.
  • 0

www.pickmike.com
I don't just develop software. I find solutions to your business needs.


#5 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 29 October 2012 - 08:57 PM

If you serialize the list you will get back a list, so no need to use separators.
You can also store a big xml string,so you make the xml to parse your field, and then you can be reasonable and use two tables :D
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download