3 ms·
Just to give you an idea of how you would do that in Delphi (even in 1996): 1) Drop an instance of your database-specific query class (or a generic database AP
by TimJYoung 9y ago
Just to give you an idea of how you would do that in Delphi (even in 1996):
1) Drop an instance of your database-specific query class (or a generic database API query class, such as ODBC, ADO, etc.) on a form or data module.
2) Click on the property editor button next to the SQL property for the class instance in the object inspector.
3) Input your SQL in the provided window (or load/save to/from a file, whatever the property editor allows for).
4) Compile your application.
That's it. The SQL is now automatically included as a resource in your executable and is available to you at runtime as if it were assigned at application startup. And this isn't just limited to SQL - you can do this with any text or binary file. It's all only limited by the imagination of the developer of the component(s) that you're using in the IDE.
Visual Studio has always been a bit more obtuse in how it handles datasets/databases, so it's probably more of an example of how not to do something like this in an IDE.
The point is that a beginner can do the above, whereas I'm not sure that a beginner would even know where to begin when it comes to implementing what you've done (which is very well done, putting all of this aside).
- kd5bjo 9y agoI'm glad that at least one IDE gets this particular case right, but I think I missed my broader point. As a programmer, my job is to produce a set of instructions that a computer can understand. The Unix shell is quirkier than most, but it is a real programming language that I can bring all of my profession's skills to bear on. IDEs, on the other hand, are opaque boxes that work great until you need something they didn't anticipate. I'll readily admit that my needs are no longer those of a beginner, but my learning path was a pretty steady climb of copy/pasting boilerplate, to making a few small changes, to just starting with an empty file and writing everything from scratch. I worry[1] that, by hiding complexity from beginners, we may be hindering eventual mastery in the name of making it easy to start learning. Are modern intermediate-level developers asking questions like: - I've been told to always do X; what happens if I don't? - This thing I usually ignore seems vaguely related to my current problem; what does it actually do? [1] Without any real foundation or evidence