Click here to Skip to main content
15,885,767 members
Everything / Sqlite

Sqlite

SQLite

Great Reads

by Thomas Weller
Demonstrates how to run Python scripts from C#
by DaveMathews
Use Oscova, a bot development framework, to create a Natural Language Interface to an SQL Database
by Glenn Prince
In this second part of the Data Cleaning with Python and Pandas series, now that we have a Jupyter Notebook set up and some basic libraries initialized, we need to load some data. To do this, we’ll load data from a CSV file, as well as from a local SQLite database.
by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.

Latest Articles

by Zijian
Reusable codes for JWT security in business applications
by Mircea Neacsu
Examines the performance of SQLite in multi-threading applications
by Member 4206974
A PHP class that uses PDO for creating a table from JSON Objects
by JBartlau
This article demonstrates how Report Server offers a distribution of reports that save time, increase efficiency, and reduce potential errors.

All Articles

Sort by Score

Sqlite 

26 Aug 2019 by Thomas Weller
Demonstrates how to run Python scripts from C#
17 Jan 2017 by DaveMathews
Use Oscova, a bot development framework, to create a Natural Language Interface to an SQL Database
29 May 2020 by Glenn Prince
In this second part of the Data Cleaning with Python and Pandas series, now that we have a Jupyter Notebook set up and some basic libraries initialized, we need to load some data. To do this, we’ll load data from a CSV file, as well as from a local SQLite database.
29 Jul 2016 by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.
30 Jan 2017 by Michael Haephrati
Third of several articles covering the secrets of obtaining stored (and encrypted) credentials stored by browsers
14 May 2015 by DaveMathews
Using SIML, a language designed for Digital Assistants, to create a Natural Language Interface to an SQL database.
6 Jul 2022 by DiponRoy
Quick start example to run DB and clients in docker
19 Jun 2015 by ergohack
System.Data.SQLite is great, but was missing some BLOB support. Switching to the native source project was easier than expected and provided significant functionality benefits.
22 Nov 2021 by Michael Sydney Balloni
Wanna add basic database functionality to your C++ app? Too lazy to use SQLite directly? Read on!
U 17 Apr 2024 by Zijian
Reusable codes for JWT security in business applications
28 Mar 2015 by Anele 'Mashy' Mbanga
Demonstrates how to use SQLite database for mobile development
18 Dec 2015 by Md. Marufuzzaman
This tip shows you an easy way to split Microsoft SQL Server table row data.
21 Jun 2012 by enhzflep
Here's the code I use in a C++ cgi module.sprintf(buffer, "INSERT INTO `cds` (title,artist,year) VALUES('%s','%s',%d)", bTitle.c_str(), bArtist.c_str(), yr);queryStr = buffer;db.exe(queryStr);At a guess, it looks like you've used mySql before in PHP from the way you expect to have...
7 Apr 2014 by B. Clay Shannon
Step-by-step instructions on how to view SQLite data from Android Studio and SQLite Data Browser
13 Nov 2014 by A.Ebrahimi
Tools introduction for Android developers who use SQlite in coding
29 Sep 2015 by DotNetSteve
Variety is the spice of life - rewarding PDF AcroForm reader
23 Jan 2016 by Igor_A
An architectural prototype of a business logic server as Windows Service. Sample service implementation and test utility.
8 Dec 2016 by rerhart585
Using SQLite, leverage the create_aggregate(), and SQL's Between Operator to create a Normal Probability Distribution Histogram, or what is more commonly referred to as a Bell Curve.
6 Feb 2017 by Florimond
Explains how to use Emitter with a database to store the content of collaborative todo list
13 Nov 2017 by Afzaal Ahmad Zeeshan, Iqra Ali
Develop questionnaire site with Node.js, SQLite and Pug
12 Jun 2020 by David Crow
The World's Best Weather Forecasting App (That's the Not Part!)
8 Jan 2022 by Michael Haephrati
A Static Library which can be used for all kinds of database related needs
4 May 2011 by RaviRanjanKr
Try given linksLinqConnect Tutorial for SQLLite[^]Linq to MS Access[^]LinqToSQL: Comprehensive Support for SQLite, Microsoft Access, SQServer2000/2005[^]
2 Nov 2011 by Andrew Brock
No need for OLE. Using SQLite couldn't be simpler.Simply grab the sqlite-amalgamation code from the download page[^] (the top one), add the sqlite3.c file to your solution so that their code is compiled as part of your solution, and #include at least sqlite3.h, possibly sqlite3ext.h too...
15 Feb 2013 by OriginalGriff
Probably you want:SELECT ID FROM Tasks WHERE task LIKE '! @ # $ \% ^ & * ( ) ''%' ESCAPE '\'"in the database, the data in the field is Today's Task"Check again - I just created a SQLite DB, with a table Tasks and three entries:ID(int) Task(nvarchar(50)1 Hello2 Today's Task3 XX...
13 Jun 2014 by Right Handed Monkey
This is a tutorial for accessing sqlite databases in Android in a thread safe manner. If you download the library code, please bookmark, comment on, or rate the article - it helps out tremendously.
9 Jul 2014 by Jason Parms
Lightweight Directory Access Protocol (LDAP) Injection
13 Aug 2014 by Cindy Potvin
This is the fourth post in my series about saving data in Android applications.
21 May 2015 by Anele 'Mashy' Mbanga
Exploring the source code behind the offline CodeProject article writer CodeProject.Show.
30 Jun 2015 by OriginalGriff
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...A very quick search gave over one million hits: "export my data from sql server to sql compact"[^]On the first page is an article from this site explaining how to do it:...
19 Sep 2017 by hansoctantan
In windows, instead of using "\" as file separator use "/".
31 Jan 2018 by Pawel idzikowski
How to replace the web API request query string to provide case insensitive OData search
19 Nov 2018 by OriginalGriff
No, it doesn't have to be. The only way to be sure of an output order is to use an ORDER BY clause and reference a column that provides the order: an IDENTITY column, or a timestamp. As you add and remove rows from yoru DB, it leaves "gaps" in the data, which can be filled later to prevent...
3 Jun 2019 by CPallini
A quick and dirty search produced: SQLite NULL Values[^].
30 Aug 2020 by Jörgen Andersson
You also need to group by "NPACode > 0" The easiest way should be: SELECT brcode ,count(Acno) ,sum(balance) AS Outstanding ,CASE WHEN NPACode > 0 THEN sum(balance) ELSE 0 END...
9 Aug 2021 by Michael Sydney Balloni
Learn about the inner workings of a dynamic database, and how SQLite is a great fit
16 Mar 2022 by Maciej Los
At the first glance - replace this: cbClient.Items.Add(DS.Tables[0].Rows[i][0] + "|" + DS.Tables[0].Rows[i][1]); with this: cbClient.Items.Add(ds.Tables[0].Rows[i][0] + "|" + DS.Tables[0].Rows[i][1]); due to the fact that C# is case-sensitive...
3 Feb 2023 by JBartlau
This article demonstrates how Report Server offers a distribution of reports that save time, increase efficiency, and reduce potential errors.
4 May 2023 by Richard Deeming
The result is correct, and is precisely what you asked for. The sum of the price column is 11.248; dividing that by the number of rows (5) gives 2.2496, which is the result you are getting. The only way to get your expected value is to take the...
2 Apr 2024 by Richard MacCutchan
You have your parameters in the wrong order in the call to add_row as shown in the source code at CTkTable/CTkTable/ctktable.py at main · Akascape/CTkTable · GitHub[^]: table.add_row(END, my_data) The data dictionary must be the...
12 Jun 2011 by Freeman Ke
Last week, when I used SQLite as database for my application logs, everything is ok when the log records are less then 1000.When the records up to 20000, it is slow when I use Queryable.Skip() extension method to fetch paged records.Then I was determined to write a demo to find the...
25 Aug 2011 by emsik
Here is a list of tools:http://www.sqlite.org/cvstrac/wiki?p=ManagementTools[^]I have tried many of them and finally I chooseSQLite2009 Pro Enterprise Managerhttp://osenxpsuite.net/?xp=3&uid=managementtools[^]This is also good alternativeSQLite Manager - Add-on for...
14 Jun 2012 by Mehdi Gholam
SQLite does not support stored procedures, however take a look at this : http://chriswolf.heroku.com/articles/2011/01/26/adding-stored-procedures-to-sqlite[^]
2 Jul 2012 by Graham Breach
Use sqlite3_finalize[^] on the prepared statement.
24 Sep 2012 by Isuru Nanayakkara
Here's a list of converters.
9 Jan 2013 by CafedeJamaica
Here you goHow to RESET identity columns in SQL Server[^]
24 Jun 2013 by Ron Beyer
You can't. SqlClient is for MS SQL databases, it won't operate with an SQLite database. For that you need to download the SQLite data providers from here.[^]
9 Sep 2013 by TheUltimateDebugger
combine-two-sqlite-databases-in-bash[^]how-to-merge-multiple-database-files-in-sqlite[^]
8 Oct 2013 by Ron Beyer
Maybe this support link[^] might help?I've run into this before, if your main application is set to target AnyCPU and you have a DLL that is targeted as x86 or x64 it may give the exception because its loading in a different processor target than the DLL even though it runs fine on the...
3 Nov 2013 by Zoltán Zörgő
WMI for logging? Worst idea I ever heard. If WMI is what it means to me in Windows environment, Windows Management Instrumentation[^], than it is not meant for logging whatsoever kind. I am pretty sure sqlite is much better option. If logging is event logging and not data acquisition (like...
8 Jan 2014 by Maciej Los
Try this:SELECT Com.*, Cat.[Title] as CategoryStr, Sct.[Title] as SubCategoryStr, (SELECT COUNT(*) FROM Attachment WHERE ParentId = Com.ObjectID) as AttachmentCountFROM Component AS Com LEFT JOIN Category AS Cat ON Com.[CategoryId] = Cat.ObjectId LEFT JOIN Subcategory AS Sct ON...
14 Jan 2014 by thatraja
Did you check their documentation for backup[^]? And they have API[^]Here a simple tutorial on thisHowto: SQLite Backup and Restore[^]
9 Mar 2014 by thatraja
For .NET, SQL Server Compact[^] or Microsoft Access[^] is better option, reason is simple both these databases & .NET are Microsoft products so there're many advantages using over other databases.But SQLite[^] is nice option, cross platform & many people do use on Mobile development.
27 Aug 2014 by Vinay Mistry
try thisSELECT (FirstName || " " || LastName) AS fullname FROM person where id = 1;
20 Sep 2014 by OriginalGriff
If your code is locking the DB, that's because your code is not releasing it: you need to either use a common connection which you never release, or release the connection properly after each access. Adding waiting on your thread until it's released will not help that - becuas ethe thread that...
17 Oct 2014 by OriginalGriff
As the SQLite documentation[^] says:The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. The last_insert_rowid() SQL function is a wrapper around the sqlite3_last_insert_rowid() C/C++ interface function.Which...
4 Nov 2014 by DamithSL
//create class as below public class Book{ public string Title { get; set; } public string Author { get; set; } public string Isbn { get; set; }}//change your method to return list of books //when you call, set the query as "select titlle, author, isbn from...
21 Feb 2015 by Afzaal Ahmad Zeeshan
In Android you can use the SQLite databases to store your data in the database-form. You can get help in this scenario from this CodeProject article[^], which explains how you can work with SQLite databases, for storing and extracting the data. You can at the same time, read this third-party...
15 May 2015 by Anele 'Mashy' Mbanga
Create JQuery Mobile Apps with JQM.Show on your PC with these tools.
30 Jun 2015 by Suvendu Shekhar Giri
Here is a custom converter tool developed by @liron.levi for this kind of purposes.Check if this meets your requirement else do the necessary modification in the code and if you need help in doing so, come back and let us know.Convert SQL Server DB to SQLite DB[^]Hope, it helps :)
12 Jan 2016 by OriginalGriff
Try:SELECT A.ID, A.Name FROM TableA ALEFT JOIN TableB B ON B.name = A.nameWHERE B.ID IS NULL
22 Jan 2016 by kaviteshsingh
Simple utility to scan and find duplicate files in a directory.
20 Mar 2016 by Sumit Samediya
In this article we will learn how to use existing sqlite database in WP 8.1 apps.
6 Sep 2016 by Maciej Los
A error message is quite clear: table people already exists.Before you start creating tables, you have to check if they already exist. 1. way:SELECT name FROM sqlite_master WHERE type='table' AND name='table_name';2. way:create table if not exists TableName (col1 typ1, ..., colN...
10 Sep 2016 by Midi_Mick
A set of extension methods giving System.Data.SQLite access to Savepoints
16 Sep 2016 by Tom Chantler
If you're hosting your Ghost blog in Azure then you're probably not backing up your database, even if you think you are. I wasn't, but I am now. Here's how.
27 Feb 2017 by CPallini
Well, PHPExcel claims to be "A pure PHP library for reading and writing spreadsheet files" hence it should provide you the ability to perform the most difficult part of your task, that is importing data from Excel. The next task, i.e. storing data into the sqlite database, should be simple,...
5 Jun 2021 by Private Dobbs
How to initialise a database and then automatically keep it up to date with version releases
1 Jul 2017 by RickZeeland
AttachDBFileName is evil, see this question: How do I connect to old version database in visual stadio 2015[^]
19 Dec 2017 by Karthik_Mahalingam
try function getUrl(url) { var final = url = url.toLowerCase(); var target = []; var temp = url.split('/'); if (url.indexOf('.com') > -1) { var count = temp.indexOf('sites') count = count +...
10 Jun 2018 by OriginalGriff
To add to what Thaddeus Jones - very correctly - said, see here: Where should I store my data?[^] - it shows some better places, and how to use them.
10 Jun 2018 by Jochen Arndt
The root path of the Windows drive is owned by the system and has restricted access. Select a different path where the user running your application has write access. For application related data these are the predefined application data folders for all (common) or each user (depending if the...
23 Jun 2018 by Biswal Tanmaya
Use of Realm object in Realm event handler
12 Nov 2018 by Vlad Neculai Vizitiu
How to write automated tests using entity framework core
15 Mar 2019 by Ravi Bhavnani
Here's one way to do this: // Create a Uri from an intent string. Use the result to create an Intent. // Example latitude = 46.414382, longitude = 10.013988 Uri gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988"); // Create an Intent from gmmIntentUri. Set the action to...
7 May 2019 by Graeme_Grant
I've written an article on SQLite that shows how to work with both synchronous and asynchronous methods that should answer all of your questions: Working with SQLite in C# & VB[^]
20 May 2019 by OriginalGriff
Not like that! Never concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Always use Parameterized queries instead. When you concatenate strings, you cause problems because SQL receives...
4 Jun 2019 by Dave Kreskowiak
No. An empty string is still a string value. 0 is still a value. Null is the absence of any value or object.
15 Jan 2020 by phil.o
You should type "c# get web api data" in your favourite search engine, and follow the links and examples which it will provide to you. This is a quick answers forum, it is not meant to provide full tutorials on such large topics.
15 Feb 2020 by Richard MacCutchan
Why are you converting the returned value to an integer? That just destroys the fractional part. Try this: double sum = (double)cmd.ExecuteScalar(); MessageBox.Show(string.Format("{0:0.00}", sum));
12 Mar 2020 by phil.o
You have to create a new parameter object for each parameter. You just supposed you could get rid of redundant param = new SQLiteParameter(); lines, but you were wrong.
19 May 2020 by Maciej Los
Try this: DECLARE @customer TABLE(Customer VARCHAR(50), account int, [rank] int) INSERT INTO @customer (Customer, account, [rank]) VALUES('a',1,0), ('b',2,1), ('a',3,3), ('a',4,2), ('c',5,0) UPDATE t1 SET [rank] = t2.MaxRank FROM @Customer t1...
14 Jul 2020 by OriginalGriff
There are so many things wrong with this approach: the "open" method does a select which creates a DataReader on the connection, rendering the connection unusable until the reader is closed - and since the "outside world" can't access the reader...
5 Aug 2020 by Garth J Lancaster
huge ? text ?? you don't supply numbers so a fully qualified answer may be hard 1) subject to this Implementation Limits For SQLite[^] ie 'limits', you may be able to 'zip' compress your file then insert it into a blob - I'd suggest you write...
18 Sep 2020 by OriginalGriff
When you call ToString on anything the system looks at the instance you are calling it on, and goes back through the inheritance chain to find the "closest" implementation. If your class explicitly implements ToString then taht method will be...
30 Sep 2020 by Gerry Schmitz
You've got the same "if" in both places (i.e. there is no effective "else") if (rd.SelectedValue == "Individual")
2 Mar 2021 by CHill60
When mixing 'and' and 'or' you must use brackets to show what you really mean e.g. SELECT * FROM tbl_Device WHERE (Num1 = '1' AND Num2 = '2' AND Num3 = '3' ) AND ( Flag LIKE 'LastVersion' OR Flag LIKE 'OnlyVersion' ) As an aside there is...
27 Oct 2021 by CHill60
When I run your code for product 101 I get an error reported Quote: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, , >= or when the subquery is used as an expression. That is because you have...
6 Dec 2022 by OriginalGriff
Look at your tables: The musicians hold the people names. The instruments hold the instruments they might play The musician_instruments links the two together. So if you want to ask "tell me all the musicians who play the piano" you need to...
21 Aug 2018 by Gene Cole (CFSW)
Integrating Sqlite into your Visual Studio/C# application.
23 May 2023 by Graeme_Grant
Here is how I would look at it before I create the Sql statement: item 1. 36 2.333 83.988 item 1. 24 2.57 60 item 1. 48 2.4 115.2 Total 108 259.188 avg purchase price = 259.188 / 108 = 2.399888889 So if sell price is 4.00 * 24 = 96 The...
28 Feb 2024 by Richard MacCutchan
Quote: It worked c.executemany instead of c.execute, you are right! Added to remove from Unanswered queue.
2 Apr 2024 by Pete O'Hanlon
You shouldn't need to specify END in add_row. As far as I can tell, from the documentation, you should be able to do this to add the data to the end.table.add_row(my_data) Having looked at your code, you're trying to add a dictionary to something...
10 Feb 2011 by OriginalGriff
There is a description of all the SQLite limitations here[^]Next time, Google first!
9 Mar 2011 by novice51
Does anyone here knows how to generate sqlite report in crystal reports?sample codes,library,dll,wrapper or links would be a great help...thanks in advance!
22 May 2011 by R. Hoffmann
How about assigning the return value from ExecuteScalar() to a temp variable of type Object, and then looking under a debugger to see what is being returned?In other words:object val = cmd_id.ExecuteScalar();_id = (int)val; // Set a breakpoint here, and examine the contents of...
12 Jun 2011 by Reza Mansoori
Hello DearI Create table 'class' in SQL server and in VS 2010 I create an entity from class , code which was generated from that entity was like your generated codejust below was differentpublic ObjectSet Class{ get { if ((_Class == null)) { ...
15 Jun 2011 by CS2011
i will suggest you to go with approach 1 but do not throw the exception as it is.Check it before like if it's related to unique key display a proper message saying "Name already exists in the database."
15 Jun 2011 by walterhevedeich
Checking all the items before adding will be an overhead. I suggest you go with #1. Just make sure to handle exceptions properly so users will not freak out when they see technical errors. :)