Quantcast
Channel: Electronic Designer » Databases
Browsing latest articles
Browse All 10 View Live

Adding SQLite to a project

Get the latest set of files from system.data.sqlite.org. Binary packages are intended to be used for development and deployment of their applications onto customer machines.  Ensure you select the...

View Article



Image may be NSFW.
Clik here to view.

.Columns General

SQLite much more simplistic data types compared to SQL.  The datatype limitations can be cumbersome especially if you add time durations, dates etc as SQLite has very few built-in functions for these....

View Article

DateTime

https://www.sqlite.org/lang_datefunc.html Reading DateTime In Select Statements You need to specify you want the value returning in a DateTime format or you can just get the year portion returned!...

View Article

Creating Tables

Good Resources https://www.sqlite.org/lang_createtable.html An Example bool DatabaseSqlite::InitialiseDatabase(void) { System::Data::SQLite::SQLiteConnection ^Connection1; String ^sTemp; try { //-----...

View Article

Add new column

Adding a new column ALTER TABLE tbl_status ADD COLUMN status_default TEXT; This will cause an error if the column already exists.  To check if a column already exists first you can use: PRAGMA...

View Article


user_version Pragma

The user_version pragma gets or sets the user-defined version value that is stored in the database header. Following is the simple syntax: PRAGMA [database.]user_version; PRAGMA...

View Article

Create New Database

Create Database File Example #define SQLITE_DATABASE_FILE_PASSWORD "mypasswordgoeshere" bool DatabaseSqlite::CreateDatabase(void) { String ^FilePath; System::Data::SQLite::SQLiteConnection...

View Article

INSERT Queries

INSERT Example String ^sTemp = "INSERT INTO myTable ( \ SomeValueColumn, \ SomeStringColumn \ ) Values ( \ @SomeValue, \ @SomeString \ )"; Command1->CommandText = sTemp; //Strings should be added...

View Article


SELECT Queries

SELECT Query Example Command1->CommandText = "SELECT * FROM MyTable WHERE SomeColumnName >= @StartValue AND SomeColumnName <= @EndValue";...

View Article


GROUP BY

IMPORTANT NOTE ABOUT GROUP BY The fields you get returned are not necessarily the fields from the exact same row in a collection of group by rows.  This is relevant when you for instance want to get...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images