Database and Delphi..

I must admit we still use Delphi for certain commercial applications, though we are pushing to move everything to Java - .net (mostly) forces you to a Windows platform.
 
By table do you mean something like panel or richedit or do you mean three forms?
Would i get penalized for actually coping the lesson database from an actual tutorial CD or something?

Well I used a pagecontrol, on each tab I had a separate part of the program (less complicated than having multiple forms etc, you can also then hide/disable the tabs that you don't want the user to see at the time.)

In my proggie I displayed the Lesson title as a label, and then the lesson would be displayed in a richedit.

No, I doubt you be penalised, why would they? You might score marks by using an existing one( you writing the interface etc). However I think you should write your own lessons etc. Simple is better, if your program does the basics very well then you should be able to get an A easily. AFAIK there are 5 marks that go to "advanced programming" which is basically anything that they haven't taught in class - so to get those 5 marks just make sure that you makes fancy sounds or something depending on what happens (or a win animation, song or something).
 
Here's some free DB wisdom for you create a class say for each table.

So lets say you have a table User, create a User class that has all the fields in it that the table has and then create a database access layer that retrieves information and returns it as that User type (The class), and stores information using that same class.

Alternatively you can use DB calls directly in your program (honestly 2 hours, WTF? It cannot possibly take that long) but that's bad practice in my book.

.NET has options like datasets which is similar to the classes method I said above but I still prefer to write a class and then use a dataset as intermediate because datasets have some limitations.

Perhaps try .NET or Java, both are great for using SQL databases and lot's of people here will be able to help.
 
Last edited:
By table do you mean something like panel or richedit or do you mean three forms?
Would i get penalized for actually coping the lesson database from an actual tutorial CD or something?

Hmmm... in the real world I cut and paste from web sources all day long (with a little customisation, of course). If the material is not copyright, I see no problem. :/
 
Well I used a pagecontrol, on each tab I had a separate part of the program (less complicated than having multiple forms etc, you can also then hide/disable the tabs that you don't want the user to see at the time.)

In my proggie I displayed the Lesson title as a label, and then the lesson would be displayed in a richedit.

No, I doubt you be penalised, why would they? You might score marks by using an existing one( you writing the interface etc). However I think you should write your own lessons etc. Simple is better, if your program does the basics very well then you should be able to get an A easily. AFAIK there are 5 marks that go to "advanced programming" which is basically anything that they haven't taught in class - so to get those 5 marks just make sure that you makes fancy sounds or something depending on what happens (or a win animation, song or something).
Ok wont i need to use ado or bde or will those work with page control?
 
Ok wont i need to use ado or bde or will those work with page control?

You just insert your ADO query's and what not onto the page control as per normal...the pagecontrol just helps with not having to have 5 or 6 separate forms.
 
Not sure what direction you're going to take, but to answer the topic as timgaul said if you're looking for a Delphi DB then Firebird is the best (free) bet. Use IBObjects and you're good to go.
 
Hmmm... in the real world I cut and paste from web sources all day long (with a little customisation, of course). If the material is not copyright, I see no problem. :/

There is a difference between "real world" and "school" though.
I also use plenty of on-line code daily, but in a school environment one is expected to do it yourself.
 
*Sigh* I remember doing tones of this stuff when I was in matric, lol. Databases + Delphi, but Delphi is soo limited and quite frankly n00b compared to .net and C# :D
 
There is a difference between "real world" and "school" though.
I also use plenty of on-line code daily, but in a school environment one is expected to do it yourself.

So you wouldn't recommend copying anything you see from your textbook into your code? Especially not loops and logic statements? :confused:
 
*Sigh* I remember doing tones of this stuff when I was in matric, lol. Databases + Delphi, but Delphi is soo limited and quite frankly n00b compared to .net and C# :D

What is the best way to get into and learn .net, so vast ..... My girl swots IT/programming and I want her to move from the School Delphi straight into .net.
 
Ok guys i found a few tutorial site but they use turboDelphi it seems the coding style is the same but im not sue,do you guys think i should continue learning from it or is it a waste of time?
OH 1 more thing can someone please explain Object orientated programing how is it different from procedural?
 
turbodelphi is exactly the same as Delphi 7 (or whatever you use), I learn't on my Delphi 7 but then all of a sudden the school made us write our exams using TurboDelphi. Only difference is the UI.
 
OH 1 more thing can someone please explain Object orientated programing how is it different from procedural?

In very simple terms,

Object Orientated = The use of objects and inheritance. The preferred style of programming.

Procedural = "Top down" style of programming. Can lead to redundant code if not used correctly.

Sounds like a question from an exercise if you ask me ;)
 
Who's using Delphi and C# in the same sentence? :D C#, although I hear it is a new, adapted version of Delphi or whatever you want to call it, is in my opinion, after c++, the most powerful programming language.

Object oriented programming is by far the best way to go. All you need to remember is this: "An object is an instance of a class. It has behaviours and attributes.".... and you'll be fine.;
 
You have to use OOP to get any marks. If you don't have OOP you will probably get 50-60%. Even if if its just one separate "user" class, put it in there.
 
In very simple terms,

Object Orientated = The use of objects and inheritance. The preferred style of programming.

Procedural = "Top down" style of programming. Can lead to redundant code if not used correctly.

Sounds like a question from an exercise if you ask me ;)
Oh yeah? Well no one asked you:D
The reason i ask is because we just got a new teacher last week and apparently we have been coding wrong all this time and he introduced us to OOP:confused: We still trying to understand it, i mean the code is exaclty the same all you add is some stupid class BIG DEAL... But he says theres more to is well just have to see..
 
i mean the code is exaclty the same all you add is some stupid class BIG DEAL...

That class means a lot, trust me ^^

It can sometimes take a while to understand the OOP model, but once you do there is no going back.
 
Look, most OO languages are going to contain your procedural code; although the code will be organised into objects.

Objects are intended to mimic real world objects, for example:

You have an object that is an animal (this is our class). You also have objects that are cows and dogs (these are subclasses). Since cows and dogs are both animals they have similar characteristics; they both inherit some characteristics from this animal object. However, cows and dogs are not the same thing, but they do have the same parent (namely they are both animals).

Now, for example we can say that all animals have four legs and the make some sort of a noise. These are attributes of an animal, or rather your class variables. We know that every animal has four legs, but we don't know what noise they make (only that they make a noise).

So since the cow is an animal it has four legs and makes a noise. When we define the cow object we say the type of noise is a "moo". Similarly with the dog, it has four legs and makes a noise, which is a "woof". Since the noise attribute is different for a cow and dog they are not the same thing.

Notice how in the above example we never need to say that a dog or cow has four legs? That is because they are types of animal, and we know ALL animals have four legs. As such we save on programming time, and possible errors, by reusing parts of the parent (animal) object/classes and only defining in the child (dog, cow) subclasses the parts that make them different.

Easy peasy :D

EDIT: if you had been using a purely procedural language you would need to define everything about the dog and cow (and cat, and horse, and sheep) every single time.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X