SQLite GUI

SQLite GUI is a simple user Interface for SQLite dB. You can create / open a dB and also can create, delete and update tables in the database. All the tables in a database are shown in the DataGridView .
Data Types including BLOB are supported.

Dependencies
Add the reference SQLite.Net.dll to the project and use the namespace Finisar.SQLite to work with SQLite.

Finisar.SQLite

Finisar.SQLite is an ADO.NET Data Provider for accessing SQLite-Databases using the .NET-Framework. In SQLite a complete database is stored in a single disk file. SQLite is zero-configuration – no setup or administration needed. SQLite itself is “a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine” (quoted from the sqlite.org Website). The Finisar.SQLite Data Provider is an easy way to use the SQLite-Database in .net Languages like C# and VB.net.

Screenshot
sqliteGui Screenshot

Sample Code

try
{
//Connection string
string connString = String.Format(“Data Source={0};New=False;Version=3”, DB_NAME);

//Connecting database
SQLiteConnection sqlconn = new SQLiteConnection(connString);

//Open the connection
sqlconn.Open();

//Query
string CommandText = “Select name from sqlite_master;”;

//SQLiteDataAdapter to fill the DataSet
SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(CommandText, sqlconn);
dataAdapter.Fill(ds);

//Get the collection of rows from the DataSet
DataRowCollection dataRowCol = ds.Tables[0].Rows;

//Add the tables available in the DB to the combo box
foreach (DataRow dr in dataRowCol)
{
tablecombobox.Items.Add(dr[“name”]);
}

//Close the Connection
sqlconn.Close();

}
catch (SQLiteException sqlex)
{
MessageBox.Show(sqlex.Message);
}

To Do/Known Issues

Update cannnot be performed on table without primary key.
The SelectCommand must also return at least one primary key or unique column. If none are present, an InvalidOperation exception is generated, and the commands are not generated.
The alternative way is create select, insert and update command for that particular table. Refer MSDN .It will be available in the next version of SQLite GUI.

Download Code

Published in CodeProject.com on March 10, 2007

Financial/Tax Planning with good Retuns

Recently I were discussing with my financial/Insurance advisor regarding this Year’s tax planning. I asked him for a plan that it would help me in
1. tax savings
2. and also it should be an investment which should return more returns at me age of 53.
3. And if anything happens to me my Dependants (wife and kids), won;t be affected and they have to be taken care of with sufficient money for their future.

I’ve opted for 50 Lacs coverage.

There are two plans he suggested.

One Plan is from Birla sun life.
For 50 Lacs
* you have to invest 5000Rs per month else yearly 60000
* you have the option that you can pay 2000 one month if you have less money and if you have more you can pay more. the thing is you should have paid 60000 at the end of the year
* it covers normal death benifits, accidental and even covers major diseases (11 diseases are listed)
* you can get the tax benifits under 80C
* The min lock in period is 4 Yrs. The total investment yrs you have do is 10 yrs. so at the end of 10 yrs you have paid Rs 6Lacs
* Since this is Market linked Policy, With a 10 % projected growth, you would get 23 Lacs(approx).

Another from LIC (Jeevan Tarang)
* you have to pay Rs800+ (age 33) Per Lac for a month.
* at the end of 10 yrs you would get sum assured and the bonus, loyalty addition
* then every year you get Rs 5,500 until your age of 100.
* after our life, our nominee will get another sum assured (say 1 Lac)
* you can get the tax benifits under 80C

after going thru the Jeevan Tarang i decided Like this

In this plan what I would like to suggest is
take a policy for 1 Lac per Month till the next coming 12 Months. so the next April 2008 you would have took 12 policies (apr 2007 -08)
first year (apr 07- apr 08) you will be paying
Rs 800, (1 Policy)
Rs 1600 (for 2 policies)
Rs 2400 (3)

from the next year you have to pay for 12 policies / month up to 10 Years.
After Apr 2017 (10 yrs)
you will get 10 Lacs with bonus + addition
and 5,500 per Month until your age of 100
your nominee will get another sum assured Rs. 10 Lac.
Sounds really good.??? this is better than any other pension policy which won’t yield this much returns

Let me know your thoughts