Click here to Skip to main content
12,693,693 members (35,587 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# JSON SQLite
I am having a requirement where i fetch nearly 10000 records making ajax call in form of Json data on client side. Now i want to store that data into SQLite database.
So i need the Code relative to this or can anyone refer any link. It will be very helpful.
Posted 22-Oct-12 7:46am
Comments
Zoltán Zörgő 22-Oct-12 13:04pm
   
SQLite is a requirement? Since there are so-called NoSQL databases, that are built just for storing "documents" like json objects, some have direct http-json interface.
But if you stick to SQLite, as json format is string, you can encapsulate the records in any string. Do you need to fetch all 10k records at once?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I know I am very late here, but I just landed here when I was looking for some solution.

Hi There are two things here.

1) Is that JSON going to remain in same format, if yes then using NewtonSoft JSON.Net, convert that JSON back to object array and then store them manually to SQLite Database.

2) if JSON Format is not going to remain same then you need to write a parser where you can create an object out of JSON and then using SQLite libraries create a table and store data there.

Unfortunately I don't have any code for same but I am working in this direction and will update you once I will get some code for same.

You can also refer below link,

http://www.dreamincode.net/forums/topic/355466-json-to-sqlite/[^]

Thanks
Rushi
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 23 Oct 2015
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100