Originally posted by: tinyabs
It is better to start with Visual Basic first if you are new to programming. There are many details to take care of in Delphi. The language is simpler and framework is easier than C++.
Delphi doesn't hide what is going on behind the scenes nearly as much as VB. This is a GOOD thing. The way VB obfuscates things WILL get you into trouble. Plus, as Nothinman said, VB teaches bad programming habits. Hell, I'd go as far as to say VB frequently
enforces bad programming habits with things like its lack of exception handling, the inability to split a class implementation across files (short of having global functions...), an IIF function that first makes you think its like ?: in C but actually you end up using an expanded if-then-else because iif evaluates both cases regardless which one is specified, and converts things to variants, no way to pull individual chars out of a string without a high overhead mid$ function, or compare them as chars (not strings) , etc.
Also, the VB framework is
NOT easier than Delphi, in fact its quite the opposite. VB teaches you how
NOT to think about programming and will increase the learning curve when you try to do other languages later.
BTW, a SQL client is probably not a good project to first learn programming on. Learning SQL and dealing with the associated objects may be the hardest part of the project.
A few tips for beginning Delphi:
1. F11 brings the Object inspector to the front, F12 switches between having the code editor and the associated form in front
2. Types declared using the "class" keyword are always descended from TObject, and are inherently pointers, even though you use just a '.' rather than '^.' to refer to their data elements & methods.. When you declare one of these objects the default value is nil, you have to say "variablename := WhateverClass.Create;" or assign it to some existing instance before actually using it. Deallocate the object with Free, not Destroy, this checks if it is nil before trying to call the destructor. Types declared with the "object" keyword are classic object pascal style objects which are not inherently pointers (you will probably never use these).
3. Use the events tab in the object inspector to see the list of all events a component/form supports, rather than just setting the default event you get double clicking it. BTW these events are actually function pointer properties you can reassign at runtime.