Skip to content
New issue

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

Error trying to open Database - Code 14 "out of memory" #17

Closed
rwtoner opened this issue Oct 6, 2014 · 3 comments
Closed

Error trying to open Database - Code 14 "out of memory" #17

rwtoner opened this issue Oct 6, 2014 · 3 comments

Comments

@rwtoner
Copy link

rwtoner commented Oct 6, 2014

I have added an sqlite3 db file to my project. However, when I try to access the database via Database(path: "myDB.db") I receive the following error upon calling the open() method:

Error Domain=sqlite3 Code=14 "out of memory"

Any ideas as to what I am doing incorrectly?

Code:

let database = Database(path:"brynkaTest.db")
var error : NSError?
if !database.open(&error) {
// handle error
var test = error!.description;
}
database.close(&error)

@Barbur01
Copy link

Barbur01 commented Oct 6, 2014

You need to do this:

let pathDB = NSBundle.mainBundle().pathForResource("brynkaTest", ofType: "db")
let database = Database(path:pathDB!)

@rwtoner
Copy link
Author

rwtoner commented Oct 6, 2014

Duh, thank you. Sorry for the noob question.

@rwtoner rwtoner closed this as completed Oct 6, 2014
@nerdyc
Copy link
Owner

nerdyc commented Oct 7, 2014

Thanks @rwtoner. It's exciting to see a community around this project, and I hope it continues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants