Re: EuMVC-SQlite3:Weird Unassigned Variable Issue

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...
ghaberek said...
euphoric said...

Why does it claim sqlitedb has not been assigned a value?

If I comment out the "include sqlite3.e" line, it works fine!

Are you using the MVC wrapper or do you have another "sqlite3.e" somewhere else?

The MVC/Sqlite3 wrapper

ghaberek said...

You should have your Euphoria include paths pointing to the MVC include/ directory and reference things from there.

I just moved it from the repo into the app directory. It's sitting right there with the source.

Oh, this is not an MVC app!

I had to comment references to the logging library.

Is that not a good way to use it?

Oh. Well, aside from the logger references it should be fine. Eventually I'd like to move this to Euphoria along with a bunch of other MVC stuff.

But sqlite3_open() in the MVC wrapper should always to return a sequence of two values, and the result you're getting indicates that it's only returning one (an atom).

Either that or something weird is going on with multiple assignment. (You are using Euphoria 4.1, right?)

What happens when you run this:

include sqlite3.e 
? sqlite3_open( "test.db" ) 

You should see a sequence like {0,12345...} which is the result code (SQLITE_OK) and the database handle (a memory address).

If you're including the wrong file, you can try to locate it like this:

include std/filesys.e 
include std/pretty.e 
 
pretty_print( 1, locate_file("sqlite3.e",include_paths(0)), {2} ) 

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu