Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
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

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
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900