SQLite3 database connection functions and commands !

sqlite3_open() – will result in a database with the default UTF-8 encoding. sqlite3_open_v2() – will result in a database with the default UTF-8 encoding. sqlite3_open_16() – is used to create a database, the default string encoding will be UTF-16 in…

What is Save-Points in SQLite !!!

SQLite also support save-point. Savepoints allow you to mark specific points in the transaction. You can then accept or rollback to individual save-points without having to commit or rollback an entire transaction. Unlike transactions, you can have more than one…

Datatype supports in Sqlite !!!

SQLite support only five concrete datatypes.i.e NULL,Integer,Float,Text,BLOB. 1) NULL – A NULL is considered its own distinct type. A NULL type does not hold a value. Literal NULLs are represented by the keyword NULL. 2)Integer – size is 8 bytes.…

What are the SQLite standerd return codes.

SQLITE_OK Operation successful SQLITE_ERROR Generic error SQLITE_INTERNAL Internal SQLite library error SQLITE_PERM Access permission denied SQLITE_ABORT User code or SQL requested an abort SQLITE_BUSY A database file is locked (usually recoverable) SQLITE_LOCKED A table is locked SQLITE_NOMEM Memory allocation failed…

How to create SQLite3 database using mac Terminal.?

1. Using spolight(press the cmd+space) search the terminal, Terminal its a default editor avilable in mac. or in the Menu go on Application -> Terminal. 2.First select the location where you want save your database file. i choose desktop. then…

What is SQLite.?

SQLite is a public-domain software package that provides RDBMS(Relational Database Management System) Relational database systems are used to store user-defined records in large tables. Features of SQLite. Serverless. SQLite is a serverless does not require a separate server process or…

Basic AS/400 command abbreviations

Basic AS/400 command abbreviations

Command Abbreviations--Verbs ADD - Add CFG - Configure CHG - Change CPY - Copy CRT - Create DLT - Delete DSP - Display GO - Go to a Menu RMV - Remove STR - Start WRK - Work with Command…

Creating a Data File in AS400

Creating a Data File in AS400

To create a file named FTPOUT that is 100 characters in length: CRTPF FILE(MYLIB/FTPOUT) RCDLEN(100) The AS/400 actually creates a file named FTPOUT, a member named FTPOUT and a field of length 100 that is named FTPOUT. To make a…

How to Create an iSeries Database File

How to Create an iSeries Database File

Procedure Launch a BlueZone iSeries Display session. From the BlueZone MenuBar, choose Transfer:Send/Receive. The BlueZone Host File Transfer desktop user interface will launch. From the Host File Transfer MenuBar choose Transfer:Create iSeries Database File or, click the Create iSeries Database…

Tips for Database Normalization

Tips for Database Normalization

Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable characteristics like Insertion, Update and Deletion Anamolies. It is a two step process that puts data into tabular form by removing duplicated data from the relation…

Tips for SQL Query Optimization

Tips for SQL Query Optimization

The sql query becomes faster if you use the actual columns names in SELECT statement instead of than '*'. For Example: Write the query as SELECT id, first_name, last_name, age, subject FROM student_details; Instead of: SELECT * FROM student_details;  …

Tips for Database ConnectionStrings of Various Provider

Tips for Database ConnectionStrings of Various Provider

Microsoft SQL Server // ODBC DSN using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Dsn=DsnName;" + "Uid=UserName;" + "Pwd=Secret;"; conn.Open(); // ODBC -- Trusted Connection using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Driver={SQL Server};" + "Server=ServerName;" +…

Tips for beginner programming mistakes

Fear and lack of self-confidence The number one mistake you can make as a beginner programmer is to think you’re not good enough, not smart enough: that you have the wrong type of brain, and you’ll just never get it.…

Tips for performance tuning of databases

Database statistics The most important resource to any SQL optimizer is the statistics collected for different tables within the catalog. Statistics is the information about indexes and their distribution with respect to each other. Optimizer uses this information to decide…

How to Check your browser supports IndexedDB or not .

The very first thing we should do is check for IndexedDB support. While there are tools out there that provide generic ways to check for browser features, we can make this much simpler since we’re just checking for one particular…

What is IndexedDB in HTML5 ?

IndexedDB provides a way for you to store large amounts of data on your user’s browser. Any application that needs to send a lot of data over the wire could greatly benefit from being able to store that data on…

Creating Simple Event with MySQL

Creating a First Event Creating an Event is somewhat like creating stored procedure or user defined function in MySQL. You will have DELIMITER, BEGIN, DO and END keywords. As mentioned earlier we can define the execution time for the event…

How to renaming a sqlite table programatically in iphone?

NSString *querystring ="ALTER TABLE GlossaryRelation_Temp RENAME TO GlossaryRelation "; [self updateStatus:querystring]; -(void)updateStatus:(NSString *)queryString { NSString *docsDir; NSArray *dirPaths; dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); docsDir = [dirPaths objectAtIndex:0]; strDatabasePath = [NSString stringWithString:[docsDir stringByAppendingPathComponent:database name]]; NSFileManager *filemgr = [NSFileManager defaultManager]; if ([filemgr…

How to create sqlite database programmatically?

-(void)createDatabase { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; databasePath = [[NSString alloc]initWithString:[documentsDirectory if ([[NSFileManager defaultManager] fileExistsAtPath:databasePath] == FALSE) { if (sqlite3_open([databasePath UTF8String], &timingsDatabase) == SQLITE_OK) { const char *sqlStatement = "CREATE TABLE IF NOT EXISTS…