Well, I couldn't just give up, I had to try ONE MORE THING. <br><br>So, I put in the following code:<br><br>procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TDBNavButtonType);<br>begin<br> case Button of<br>
nbPost: begin<br> SQLQuery1.DisableControls;<br> SQLQuery1.ApplyUpdates;<br> SQLQuery1.EnableControls;<br> end;<br> nbRefresh: begin<br> SQLQuery1.Close;<br> SQLQuery1.Open;<br>
end;<br> end;<br>end;<br><br>At that point, I could insert a record, but not edit or delete a record. So, I tried the following:<br><br>procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TDBNavButtonType);<br>
begin<br> case Button of<br> nbDelete, <br> nbPost: begin<br> SQLQuery1.DisableControls;<br> SQLQuery1.ApplyUpdates;<br> SQLQuery1.EnableControls;<br> end;<br> nbRefresh: begin<br> SQLQuery1.Close;<br>
SQLQuery1.Open;<br> end;<br> end;<br>end;<br><br>Lo, and behold! I could now insert a record, and delete a record!!! Elated, I tried the following:<br><br>procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TDBNavButtonType);<br>
begin<br> case Button of<br> nbDelete, nbEdit,<br> nbPost: begin<br> SQLQuery1.DisableControls;<br> SQLQuery1.ApplyUpdates;<br> SQLQuery1.EnableControls;<br> end;<br> nbRefresh: begin<br>
SQLQuery1.Close;<br> SQLQuery1.Open;<br> end;<br> end;<br>end;<br><br>Alas, no joy. I can insert and delete a record, but I still can't edit a record.<br><br>I don't know if I can send attachments to this list, but if I can, the source for the trivial application is attached.<br>
<br>The schema for the table I'm using is:<br><br>CREATE TABLE IF NOT EXISTS ZIPCODE <br>(<br> ZIPID INT NOT NULL AUTO_INCREMENT, <br> ZIP VARCHAR(5) NOT NULL, <br> ZIPEXT VARCHAR(4), <br> CITY VARCHAR(40), <br> STATE VARCHAR(2), <br>
PRIMARY KEY(ZIPID) <br>);<br>INSERT INTO ZIPCODE (ZIP,ZIPEXT,CITY,STATE) VALUES<br> ('01814',NULL,'Lawrence','MA')<br>,('13502',NULL,'Utica','NY')<br>,('22030',NULL,'Fairfax','VA')<br>
,('27030',NULL,'Mt. Airy','NC')<br>,('27103',NULL,'Winston-Salem','NC')<br>,('27104',NULL,'Winston-salem','NC')<br>,('27106',NULL,'Winston-Salem','NC')<br>
,('30084',NULL,'Tucker','GA')<br>;<br><br><div class="gmail_quote">On Sat, Jun 21, 2008 at 7:35 PM, Howard Lee Harkness <<a href="mailto:howard.lee.harkness@gmail.com">howard.lee.harkness@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yes, I'm using XP Pro SP2.<br><br>Knowing how to configure Lazarus is not useful unless I can write a program that works using it.<br>
<br>I went back and checked to see if maybe I did the FPC installation without the default configuration file. Nope. It is checked by default, and I didn't change it. This time, I went through the readme and verified that I could build and run the Hello, World program. I was careful to install it directly to the directory where Lazarus would find it.<br>
<br>This time, I got a different error on the LCL build: Error: Identifier not found "LowerCaseTable".<br><br>That's it for tonight. Since my time is worth more than minimum wage, Lazarus is getting too expensive. I don't like admitting to defeat, but this one has defeated me.<br>
<br>I think I might have an old copy of D2, D3 or D4 somewhere... and maybe even a copy of D6. I know that I can make any of those do what I want, even if I have to go back to using the old BDE.<br><br>No, I don't care what database is underneath. No, I don't care if it's cross-platform. No, I don't even care what language it's written in (I am familiar with over a dozen), as long as I can make the app work. And if it can't be made to work, it doesn't matter what the database is, or whether it's cross-platform, or even what the language is. The ONLY thing that matters to a working programmer is whether the stuff he writes WORKS.<div>
<div></div><div class="Wj3C7c"><br>
<br><div class="gmail_quote">On Sat, Jun 21, 2008 at 7:26 PM, Felipe Monteiro de Carvalho <<a href="mailto:felipemonteiro.carvalho@gmail.com" target="_blank">felipemonteiro.carvalho@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>2008/6/21 Howard Lee Harkness <<a href="mailto:howard.lee.harkness@gmail.com" target="_blank">howard.lee.harkness@gmail.com</a>>:<br>
</div><div>> At this step: Go to Tools --> Configure build lazarus<br>
> I get the error: Fatal: Can't find unit system used by AllLCLUnits<br>
<br>
</div>I just tested here and it works for me. I don't know what is<br>
different. Maybe you unchecked "create default configuration file" in<br>
the fpc installer.<br>
<br>
Are you using Windows XP too?<br>
<div><br>
> At least I was able to get 2.2.0 to restore. However, I'm back where I was<br>
> before: A trivial 1-hour project has taken nearly 20 hours over a period of<br>
> 3 weeks, and I haven't got anything to show for that effort. I'm tired of<br>
> this.<br>
<br>
</div>If you focus in the positive side, you learned a lot about how to<br>
configure lazarus =)<br>
<br>
Also, the original answer by Joost was:<br>
<div><br>
"You can find this problem in the bug-tracker. You can work around it<br>
with 'TDataset.DisableControls' and 'TDataset.Enablecontrols' around the<br>
applyupdates call. Or try fpc 2.2.2rc1 or any later version."<br>
<br>
</div>So instead of trying to configure Lazarus with FPC 2.2.2rc1 you coul<br>
just have used TDataset.DisableControls ...<br>
<div><br>
> to work on this for the week, so I think I'll stop by Fry's on the way home<br>
> from work sometime next week and buy a copy of Visual Basic. Bet it won't<br>
> take me 20 hours to write a trivial DB app in VB.<br>
<br>
</div>It surely won't be cross-platform, nor will it support unicode =P Also<br>
it's probably a bad choice, as VB will probably wish that you use<br>
Access instead of MySQL (unless you don't care about which database to<br>
use).<br>
<br>
But I do agree that Lazarus needs to improve when it comes to<br>
developing database aware applications.<br>
<br>
With the money from VB you could pay someone to fix all problems with<br>
lazarus database apps connecting to mysql =P<br>
<br>
I would go as far as saying that the only case in which I would<br>
recommend for someone to use Delphi instead of Lazarus is if he is<br>
developing Windows-only data-aware applications and he doesn't need<br>
any of the other features of Lazarus (like being open source,<br>
supporting unicode, etc).<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div>Felipe Monteiro de Carvalho<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lazarus.freepascal.org" target="_blank">Lazarus@lazarus.freepascal.org</a><br>
<a href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><font color="#888888">Howard Lee Harkness<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Howard Lee Harkness<br>