Return to Snippet

Revision: 14620
at June 7, 2009 20:36 by arpit


Initial Code
(void) aDBOperation: (NSString*)rName  phone:(NSString*) rPhone type:(NSString*)rType
{
	if(sqlite3_open([[self dataFilePath] UTF8String],&database) != SQLITE_OK){
		sqlite3_close(database);
		NSAssert(0, @"Failed to load database");
	}
	
	NSString* query = [NSString stringWithFormat:@"INSERT QUERY HERE;", param];
	sqlite3_stmt *statement;
	if(sqlite3_prepare_v2(database, [query UTF8String], -1, &statement, nil) == SQLITE_OK){
		
	}
		sqlite3_finalize(statement);
		NSLog(@"length of returned array %d",[dishes count]);
	}
	else{
		NSLog(@"There was an error loading from db");
	}
	
}

Initial URL

                                

Initial Description

                                

Initial Title
Stub for SQLite operations for IPhone SDK

Initial Tags
iphone

Initial Language
Objective C