[Lazarus] SQLDB issues.

Michael Van Canneyt michael at freepascal.org
Wed Jan 6 08:11:17 CET 2010



On Tue, 5 Jan 2010, Matt Shaffer wrote:

> I thought I would just do a little update. I've been successfully able to write now, BUT, I don't believe the SQLdb components were really keeping SQLite in mind (the
> db I'm using). You see, Lazarus opens a connection to the SQLite database, preventing my app that's running (for debugging purposes) from writing. So I have to build
> the app, close Lazarus, then run my app... Should I file a bug report for this?

No.

It is a limitation of sqlite. Make sure that the sqlite connection in the IDE is closed 
prior to running the app, and set it to connected in the application code.
(you'll have to do this anyway for production systems).

Michael.

> 
> On Tue, Jan 5, 2010 at 8:02 PM, Matt Shaffer <dazappa.matt at gmail.com> wrote:
>       Different issue: Saving to the database. I can't manage to figure this one out.If I do: query.ApplyUpdates; the database isn't actually written to.
> If I do: query.Post; query.ApplyUpdates; it says that it's not set for editing.
> 
> So, where I'm having trouble is where to set the state? I've done query.State := dsEdit; but that understandably yells at me..
> 
> On Tue, Jan 5, 2010 at 3:49 PM, Matt Shaffer <dazappa.matt at gmail.com> wrote:
>       It turned out that for some reason restarting the IDE fixed the problem. The data now populates happily.
>
>       2010/1/5 Michael Van Canneyt <michael at freepascal.org>
> 
>
>       Can you post the files somewhere ? It should work; it sure does here.
>
>       BTW. You can set the 'Active' property to true even in the designer,
>       it should show the data in the grid as well.
>
>       Michael.
> 
> 
> On Tue, 5 Jan 2010, Matt Shaffer wrote:
>
>       Yes, it is indeed.
>
>       On Tue, Jan 5, 2010 at 1:21 AM, Serge Girard (via Orange) <
>       girard.sergea at orange.fr> wrote:
>
>             Matt Shaffer a écrit :
>
>              So I found this helpful wiki page
>                   http://wiki.lazarus.freepascal.org/SQLdb_Package for getting started with
>                   the db components. Great! I (believe) I've followed the tutorial exactly,
>                   everything's working until I try to drop a tdbgrid with my datasource onto
>                   the form. No data is shown. I double check my sql query, "select * from
>                   actions", I click the run button and the data shows, so I was confused as to
>                   why it wouldn't show in the grid. I compiled the program anyway, thinking
>                   maybe the IDE's auto query executor was broken, but no luck. Still
>                   completely blank. I've tried the same thing with a dblistbox as well.
>
>             Uhm , is your DbGrid/dblistbox linked to a datasource , and the datasource
>             to your Query ?
> 
> 
> 
>
>             --
>             _______________________________________________
>             Lazarus mailing list
>             Lazarus at lists.lazarus.freepascal.org
>             http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
> 
> 
> 
> 
>


More information about the Lazarus mailing list