views:

59

answers:

1

hai i a'm trying to create a sqlite database programmatically at the run time. can anybody say how to create it in iphone sdk. thanks in advance

+3  A: 

Just call the sqlite3_open function it will create a database if no database exist on the path.

// generate databasePath programmatically
if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) 
{

// your  code here
}

post a comment if you need more code example on this

Saurabh
thanks saurabh.
KingofHeaven
Your most Welcome!
Saurabh