package com.chaoran.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class SqlHelpUtil extends SQLiteOpenHelper {
	//建立表   desc 是说明
    String createTable="create table systable(col1 varchar(20),col2 varchar(10),col3 varchar(20),desc varchar(20));";
    private static final int VERSION = 1;
	private static final String dataBaseName = "store.db";
    public SqlHelpUtil(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(createTable);
	}
	public SqlHelpUtil(Context context, String name, int version) {
		this(context, name, null, version);
	}
	public SqlHelpUtil(Context context) {
		this(context, dataBaseName, VERSION);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}
