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