1. SQLite3: Sample Usage

@ghaberek, where can I find an example or two of using the SQLite3 library?

new topic     » topic index » view message » categorize

2. Re: SQLite3: Sample Usage

euphoric said...

@ghaberek, where can I find an example or two of using the SQLite3 library?

The db/sqlite3.e library is pretty much a direct wrapper around the SQLite C/C++ API so if you're unfamiliar with SQLite3, I'd start there. I can put together a few examples soon.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: SQLite3: Sample Usage

ghaberek said...
euphoric said...

@ghaberek, where can I find an example or two of using the SQLite3 library?

The db/sqlite3.e library is pretty much a direct wrapper around the SQLite C/C++ API so if you're unfamiliar with SQLite3, I'd start there. I can put together a few examples soon.

I might've been familiar with it at one point, but now it's just a matter of brushing up on it, I suppose. smile

new topic     » goto parent     » topic index » view message » categorize

4. Re: SQLite3: Sample Usage

While it's not the same wrapper, you could do worse than have a peek at http://phix.x10.mx/docs/html/pSQLite.htm

new topic     » goto parent     » topic index » view message » categorize

5. Re: SQLite3: Sample Usage

petelomax said...

While it's not the same wrapper, you could do worse than have a peek at http://phix.x10.mx/docs/html/pSQLite.htm

Thanks, Pete! I hope you've now come to understand and embrace inner/outer joins. grin

new topic     » goto parent     » topic index » view message » categorize

6. Re: SQLite3: Sample Usage

For learning and testing, I created a simple app.

It does not work as expected.

There is no console output, but the "test.sqlite" file is created.

include std/console.e 
include sqlite3.e 
 
-- prepare the sqlite3 db 
atom db = 0 
integer sqliteResult = 0 
 
puts(1,"\nOpening the SQLite3 database: test.sqlite") 
{sqliteResult,db} = sqlite3_open("test.sqlite") 
puts(1,"\n\tDone!") 
 
?sqliteResult 
?db 
 
wait_key() 
 
sqlite3_close(db) 
new topic     » goto parent     » topic index » view message » categorize

7. Re: SQLite3: Sample Usage

euphoric said...

For learning and testing, I created a simple app.

It does not work as expected.

I commented on the other thread. Here is an example I put together: Euphoria MVC SQLite3 Example

-Greg

new topic     » goto parent     » topic index » view message » categorize

8. Re: SQLite3: Sample Usage

ghaberek said...

I commented on the other thread. Here is an example I put together: Euphoria MVC SQLite3 Example

Edit: I ran the sources from console and they both worked (mine and yours).

Trying to use it from a Win32Lib app...

That example doesn't DOES work for me (from the console). smile

I'm searching my drive for another sqlite*.* file, but I'm pretty sure I don't have anything else.

I'm (still) also going to debug the sqlite3.e library to try to find it where it's glitching for my other app...

More Edits

I had Ray's sqlite module, but I'm not sure it was in the path... Your library still doesn't seem to work with Win32Lib, but I'm still investigating...

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu