Board index » delphi » Querying two Access MDB files

Querying two Access MDB files

How can I SELECT.... WHERE <alias1>parentID = <alias2>parentID?

I looked at another recent post ("SQL Statement" by Golden (03-30-02)) that
had a similar question with Paradox aliases.

Unfortunately I could not get the suggestions to work with Access MDB files
and I cannot find any other references at this time.

New to Delphi, I worked in app dev for Progress Software (www.progress.com)
I am more than likely missing something obvious to many of you.

The SQL statement is in form1.query1.SQL.  I'm assuming this could just as
easily go in a procedure?

Any ideas/suggestions and pointers to reference works much appreciated.

Regards,

Jef Fowler

 

Re:Querying two Access MDB files


Quote
Jef Fowler wrote:
> How can I SELECT.... WHERE <alias1>parentID = <alias2>parentID?

> I looked at another recent post ("SQL Statement" by Golden (03-30-02)) that
> had a similar question with Paradox aliases.

> Unfortunately I could not get the suggestions to work with Access MDB files
> and I cannot find any other references at this time.

> New to Delphi, I worked in app dev for Progress Software (www.progress.com)
> I am more than likely missing something obvious to many of you.

> The SQL statement is in form1.query1.SQL.  I'm assuming this could just as
> easily go in a procedure?

> Any ideas/suggestions and pointers to reference works much appreciated.

> Regards,

> Jef Fowler

If i remember well, it was something like:

SELECT ... WHERE "C:\..\DB1.MDB".FIELD1 = "C:\...\DB2.MDB".FIELD2

--
JAM - Reljate y disfruta...

Re:Querying two Access MDB files


Quote
"Jef Fowler" <jfow...@cccdp.org> wrote in message

news:3d08d012_2@dnews...
Quote
> JAM,

> Thank you, but I am still getting errors.

> I added the tablename and fieldname ie.
> "C:\..\DB1.MDB".TABLEA.FIELD1 = "C:\...\DB2.MDB"TABLEB.FIELD2

> Actual code..
> select * from socparent
> where "F:\program

files\borland\delphi5\projects\soc.mdb":socparent.parentid

Quote
> =
> "L:\Pro\class.01\info.mdb":parentinfo.parentid;

> Get a
> "General SQL error
> Syntax error in PARAMETER clause."

> I have been through the code and eliminated a couple of typos
but same
> error.

IIRC, you can only do this using aliases and not actual
path/filenames and only through the BDE.

Woody (TMW)

Other Threads