Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does one reference across SQL DataBases? 6

Status
Not open for further replies.

delphiman

Programmer
Dec 13, 2001
422
ZA
I am using Delphi 6 Enterprise and I have two DataBases.
ONE.gdb which encapsulates a Table called TBLME
TWO.gdb which encapsulates a table called TBLYOU

I need to achieve the following using

Select *
from TBLYOU t1, TBLME t2,
where t1.Father = t2.Father

But both TIBDataSet (and TIBQuery) only permit that one has access to all the tables in one DataBase at a time.

Does anyone know a way whereby one can access the tables in two seperate DataBases together and at the same time?

Is there perhaps a fancy DataSet (something?) somewhere which will permit this? Or do I have to create my own? :-(

Thanks in advance.




 
subject: db connections

I've nothing against installing the BDE (especially when in a setup program), not sure what one does when using DBExpress though, if that needs installing in a similar way.

I haven't used ADO unfortunately as I don't have the Enterprise version - I believe nothing extra needs installing on the users' PCs when using this, is that right?

My understanding is you have to install something on a user's pc to connect to a db, if it's Oracle or Sybase drivers - am I wrong to make this claim, I'm open to feedback.

In my experience, my favourite way (if you have the resources) is to stick your app and DB connection stuff on a terminal server. But then you still have to install the terminal server client software on each user's pc.

I'm waffling...
 
You are right weez, always you need to install something. For Interbase to work, you need the client software, for Ado to work you need the mdac extension. This extension comes embedded in ME and XP. In my opinion (IMHO) Odbc brings other headaches, it is based on the plug 'n pray technology of Micro$oft Steven van Els
SAvanEls@cq-link.sr
 
>always you need to install something.

Stephen when one boils it all down you are right. You have just said it so well! :)

However if you stick with the BDE (and Paradox) you are then stuck with Paradox (I think) which is a poor option for 3-Tier developments. Since inter alia one is then confronted with pessimistic locking for starters. (Whereby a record can not be looked at by more than one ThinClient at a time.)

For starters .... :)
 
DelphiMan

I'm a bit unsure what you're on about with your last msg about being stuck with BDE and Paradox [smile]

You use a suitable database for the task in hand. If Paradox doesn't allow multi users and you need that, then you have to use something else. Isn't Access the same? If money/resources are a problem, eg can't go out and buy a decent database, then the users will have to box and cox.
 
This is the first time Paradox has been mentioned in this thread. It is irrelevant.

The whole point of the BDE (and ADO, dbExpress etc) is that you are not stuck with one database system such as Paradox.

I agree that Paradox is not the best option for n-tier (where n>1) systems.

You can achieve your original requirement of accessing multiple InterBase databases by using TQuery type components and the BDE (using what Borland calls heterogenous queries).

Has anybody tried heterogenous queries using dbExpress? This might be a more acceptable solution to delphiman (if it works).

Andrew
 
Terry with the BDE you are not limited to paradox, I use it also for access, interbase and oracle. The reason that all most of the BDE examples are in paradox is simply because it is a Borland product. There are examples with Interbase and XML and text delimited files.
You wouldn't expect Borland to promote msaccess examples, although it could be handy. Even the Database explorer runs on the BDE Steven van Els
SAvanEls@cq-link.sr
 
Thanks guys!!

Of course you are all perfectly correct. I suddenly realised that my statement was wrong after I had sent my last thread. :-(


Admittedely I lost the plot myself a little. LOL

By switching from a Paradox Database to an SQL DataBase I imagined (for some reason that escapes me now) that I would thus exclude use of the BDE - which I wanted to avoid anyway because of installation hassles.

But as Stephen points out one has to "install something anyway" which in my case already includes having to install (at least) Interbase along with my .exe?
So why not the BDE too?

I guess that to-day (unlike "the good old days" -when one simply copied an .exe onto a system) one just has to get used to having install all sorts of stuff along with one's .exe. Comes with the territory.

And as towerbase has pointed out my problem of cross referencing across DataBases is in fact handled by use of the BDE .

Thanks guys .. and to a great website!

TERRY
 
>then the users will have to box and cox.

weez ...What is box and cox ? :)


 
Maybe lately we have been pushed toward the so called microsoft "wizards.
Some magical force inside the computer lets every thing happen. The drawback is that 1, one hick-up in the progress could prevent the system from working.

If you break your installation process, down to logical steps, you will have full control over the system. The bigger the program, the more windows resources are used. You knew that in Windows 95, the TTabSheet component doesn't show the caption?

The "wizard" method creates only less smart users.

Like you have seen, if you do not install the Interbase Client files, which is consist I think about 1 or 2 dll's, your application will not communicate with Interbase. The same applies to Oracle and SQL-server.
The BDE implements a common layer that make it posible to make your apllication database Independent.
In other words if your Client want Oracle instead of SQL-server or Interbase, you just produce the required database and change the driver.

Steven van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top