[Gambas-user] Writing a Gambas/SQLite tutorial
Benoit Minisini
gambas at ...1...
Mon Mar 7 17:38:07 CET 2005
On Monday 07 March 2005 17:29, AenDeuRyu wrote:
> Hi, I'm writing up a tutorial that shows newbies with
> a Visual Basic background how to integrate Gambas and
> SQLite. Dumb questions -- since I'm new to the Gambas
> way of doing things myself...
>
> 1) The first time I ran gambas-database-manager to set
> up an sqlite server, after I finished creating the
> server, I got an error when trying to double-click on
> it (can't remember the exact wording). Now, this was
> fixed after I ran a "Scan Database Servers", but
> there's a problem. I'd actually like to recreate that
> error-message-scenario for a screenshot, but at the
> moment all new databases that I create are instantly
> accessible without the scan. Is there some sort of tmp
> file or config file or something I can delete, so that
> when I run the g-d-m again it'll be like I'm running
> it for the first time, so I can get that error again?
Remove the '~/.gambas/gambas-database-manager.conf' file.
>
> 1a) Further to 1, is there a reason why that error
> occurs? Does the scan need to be run once, just to
> initialize something that won't have to be initialized
> again? I can handle a "that's just the way things work
> right now" response, if that's what it is, I just want
> to put it into the tutorial.
>
I don't know. Show me the error.
> 2) Just want to fact-check the following statements:
> * gambas needs the qt libraries to run
> * the default install of gambas gives you both the
> gambas IDE and the gambas-database-manager
> * to get SQLite integration, users need to install
> both libsqlite AND lib.gb.db.sqlite.
OK.
> * gambas2 default-installs its libraries to
> /usr/local/lib/gambas2, whereas the deb package for
> gambas-gb-db-sqlite installs its libraries to
> /usr/lib/gambas
Strange. But this is gambas2, a *development* (break everything) version.
>
> 3) The documentation on this is a little hard to come
> by (the main reason I'm writing my own), so I can't
> verify the following assertion. C programs can
> actually load the sqlite library which acts like a
> mini database engine contained within the C program,
> whereas gambas at this point interacts with sqlite
> databases through external connections, much like it
> does with postgresql and mysql, and also like the way
> ODBC works on windows. Is that right?
Not really.
> Is there a
> better explanation?
The gambas interpreter loads the gambas gb.db component that loads the
gb.db.sqlite database driver that loads the sqlite library.
> Can gambas actually handle sqlite
> databases the way C code does? If not, will that be an
> option in the future?
What do you mean exactly ?
>
> 4) Will gambas components at some point have
> datasource attributes that allow them to dynamically
> interact with databases, the way that Visual Basic
> does? I don't personally care one way or the other,
> but I want to mention this in the tutorial.
I'm currently working on the interpreter & compiler so that in the version 2
components will be able to be written directly in Gambas. Then, it will be
easy to make data-bound controls directly in Gambas.
>
> Anyhow, hope that's not too many questions (because I
> might have more later). I'm having a whole hell of a
> lot of fun working in Gambas, by the way. I used to
> teach Visual Basic back in the heyday, and it's really
> fantastic to see how much functionality Gambas has at
> this point.
Thanks!
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list