We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks for sharing!
Need to add these requirement.
The text was updated successfully, but these errors were encountered:
Can someone add these method
-(NSError *)createNewDatabase:(NSString *)strDataBaseName { NSString *strDocsDir = nil; NSArray *strDirPaths = nil;
// Get the documents directory strDirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); //get path from array strDocsDir = [strDirPaths objectAtIndex:0]; // Build the path to the database file NSString *databasePath = [strDocsDir stringByAppendingPathComponent:strDataBaseName]; NSFileManager *filemgr = [NSFileManager defaultManager]; if ([filemgr fileExistsAtPath: databasePath ] == NO) { const char *dbpath = [databasePath UTF8String]; if (sqlite3_open(dbpath, &db) == SQLITE_OK) { //NSLog(@"database created"); return nil; } else { NSString *strError = @"Failed to open/create database"; NSError *errorQuery = [self createDBErrorWithDescription:strError andCode:kDBFailAtOpen]; return errorQuery; } } else { NSString *strError = @"Database already exists with same name"; NSError *errorQuery = [self createDBErrorWithDescription:strError andCode:kDBFailAtCreate]; return errorQuery; }
}
Sorry, something went wrong.
No branches or pull requests
Thanks for sharing!
Need to add these requirement.
The text was updated successfully, but these errors were encountered: