Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Delphi and MDB's

Posted on 2005-03-09
8
Medium Priority
?
474 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
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month10 days, 9 hours left to enroll

571 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