?
Solved

Delphi and MDB's

Posted on 2005-03-09
8
Medium Priority
?
458 Views
Last Modified: 2010-04-05
Hi,

I have reached a point in programming where I am thoroughly annoyed with the BDE and paradox.
I know you can use MDB files instead, and SQL.

Could somebody please point me in the direction of tutorials or show me how to configure delphi to use MDB files and perform queries using sql instead of tables?

TIA

Philip
0
Comment
Question by:philly_tee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 164 total points
ID: 13501162
0
 
LVL 12

Assisted Solution

by:esoftbg
esoftbg earned 168 total points
ID: 13501425
download an MDB example from:
page:        http://www.geocities.com/esoftbg/
  link:        Q_21344471.zip        Delphi and MDB's
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 13501441
procedure TForm1.FormCreate(Sender: TObject);
var
  FN:     TFileName;
  ConnStr:string;
begin
  FN := ExtractFilePath(Application.ExeName) + 'FRIENDS.MDB';
  ConnStr := 'Data Source=' + FN + ';Provider=Microsoft.Jet.OLEDB.4.0';
  if FileExists(FN) then
  begin
    ADOConnection.ConnectionString := ConnStr;
    ADOConnection.Open;
    ADOQueryLIST.Connection := AdoConnection;
    ADOQueryLIST.Active := True;
    ADOQueryLIST.FieldByName('ID').Visible := False;
    ADOQueryLIST.FieldByName('INFO').Visible := False;
    ADOQueryLIST.FieldByName('COUNTRY').Visible := False;
  end;
end;

procedure TForm1.FormDestroy(Sender: TObject);
var
  I:      Integer;
begin
  for I := 0 to ADOConnection.DataSetCount-1 do
    ADOConnection.DataSets[I].Active := False;
end;
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:mhamini
ID: 13501468
hi friend ...
I provide an Article about accessing MDB files from Delphi and ... a FreeWare Good Componenet for managing MDB and other database types , directly from Borland Delphi!! ...
I upload all that usefull information such as that article and that component here :
+) www.mizan3.com/delphi/DelphiMDB.zip
download info and enjoy ... :)

Regards. (Dont Forget Accepting if this Package was usefull ... :) )
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 13501519
0
 
LVL 5

Expert Comment

by:DeerBear
ID: 13503844
Why do you want to suffer using Access? It's slow, unreliable, non standard, heavy, stupid and much, much, much annoying under many circumstances. It also helps in messing things up because it allows you to use SQL keywords as table/fields names, a
practice highly discouraged for obvious reasons.

Dates are nonstandard too(# char delimiter) and it's DARN slow when you get a fair amount of data in an MDB.
It's also easy corruptible and works very badly in a crowded net environment if you have more of 2 or 3 people
accessing the DB concurrently. There's no concept like "locking" and "concurrent access" and if you want to
compact it, then good luck! It also generates additional files and sometimes they don't get deleted, so you
have to delete them yourself otherwise the applicaton won't work anymore.

Access is better than Paradox in the POV that the former takes Paradox problems on the next level, but doesn't solve them.

There're so many alternatives to it such as MSDE or Firebird(nope, MySQL imho isn't an alternative...).

Cheers,

Andrew
0
 
LVL 22

Assisted Solution

by:Mohammed Nasman
Mohammed Nasman earned 168 total points
ID: 13507062
Take a look this free online "Free Delphi ADO DB Programming Course"
http://delphi.about.com/od/database/a/databasecourse.htm

for me, I gave up from paradox long time ago, now i'm using Native Delphi database engine Like NexusDB and DBIsam, you could find free edition of NexusDB, that work much better than access and many databases engine
get it here
www.nexusdb.com
0
 
LVL 3

Author Comment

by:philly_tee
ID: 13788642
Thanks for that - Points allocated evenly between the three posts which I found helped me.

mnasman - thannks for the tip, I'm investigating nexusdb right now.

Philip
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question