<p dir="ltr">I'm betting the lack of calling applyupdates() is my problem then, at least when accessing the data programmatically.</p>
<p dir="ltr">Still doesn't explain why changes made in bound controls disappear also? I'll investigate this further on the Lazarus end.</p>
<p dir="ltr">Thanks very much!<br></p>
<p dir="ltr">Nathan T. Wild</p>
<div class="gmail_quote">On Mar 14, 2014 4:08 AM, "Michael Van Canneyt" <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
On Thu, 13 Mar 2014, Nathan Wild wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks so much for responding! I am extremely excited about the prospect of getting this working.<br>
Nothing I do in databound controls seems to commit anything to the underlying dataset.<br>
<br>
If I open a connection, activate a TSQLQuery with 'SELECT * FROM AnyTable', connect it toa dbgrid, etc. I can delete rows,<br>
edit data etc. and it appears to work normally. Changes take effect inside the controls, values change in the dataset,<br>
etc. but as soon as I disconnect and reconnect the dataset all my changes are reverted.<br>
<br>
ODBCConnection1.Connected := TRUE;<br>
SQLQuery1.SQL.Clear();<br>
SQLQuery1.SQL.Append('SELECT * FROM AnyTable');<br>
SQLQuery1.Active := TRUE;<br>
SQLQuery1.Delete();<br>
SQLQuery1.Edit();<br>
SQLQuery1['AnyField'] := 'CHANGED';<br>
SQLQuery1.Post();<br>
<br>
All of these changes take place in the UI. i.e. the first row is deleted and the field is modified in the second. As soon<br>
as I close and re-open the table, both changes are undone.<br>
</blockquote>
<br>
You must call applyupdates. Post only modifies the in-memory copy of the data, but doesn't actually execute any queries on the database.<br>
Only when you call ApplyUpdates(), the SQL will be executed to update the database.<br>
<br>
Michael.<br>_______________________________________________<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a><br>
<br></blockquote></div>