working with paradox exporting a select to mdb

Hello guys,

I am using paradox tables and when I do a select I'd like to know if it is possible to export the result of my select to a mdb table , if not, at least to another db table. Take a look at my example:

SELECT * INTO TABLE FROM CLIENTS
WHERE AREA='SA'

Thanks
LVL 1
hidrauAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ziolkoCommented:
yup, you need two connections one to paradox and second to access, then

once you connect to paradox do your query and in loop insert data to access

QParadox.SQL.Text := 'SELECT * INTO TABLE FROM CLIENTS WHERE AREA=''S''';
QParadox.Open;
while not QParadox.EOF do begin
  insert values with QAccess
  QParadox.Next;
end;

ziolko.
0
ziolkoCommented:
yeah this will work but I don't have access on this machine to test correct SQL statement.
if nobody gives you correct answer I'll post here later this evening

ziolko.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

ziolkoCommented:
I think it should be something like this:

insert into access_table_name select  * from CLIENTS IN '[DATABASE=paradox.db;PWD=r74g78s]'


ziolko.
0
hidrauAuthor Commented:
I'm gonna test it
0
hidrauAuthor Commented:
I tried this, but it didn't work

  With ADOQuery1 do Begin
    Close;
    Sql.Clear;
    Sql.Add('INSERT INTO MYTABLE SELECT * FROM  CLIENTES IN ''[DATABASE=C:\CONTROLE\TABELAS\CLIENTES.db;PWD=r74g78s]''');
    ExecSQL;
  End

Neither

  With ADOQuery1 do Begin
    Close;
    Sql.Clear;
    Sql.Add('SELECT * INTO MYTABLE FROM CLIENTES IN "[DATABASE=C:\CONTROLE\TABELAS\CLIENTES.db;PWD=r74g78s]''');
    ExecSQL;
  End

it returns me " it is not a valid name "[DATABASE=C:\CONTROLE\TABELAS\CLIENTES.db;PWD=r74g78s]'''
0
hidrauAuthor Commented:
SOMETHING LIKE THIS HELP MAYBE CAN HELP ME AND YOU TO ASSEMBLE THE CORRECT LINE

http://www.maestrosdelweb.com/editorial/tutsql13/
0
hidrauAuthor Commented:
or

But I am not being able to assemble the correct form

:((

http://exchange.manifold.net/manifold/manuals/dbc_userman/mfdcmdrIN_Clause.htm
0
hidrauAuthor Commented:
I really don't know where I am doing wrong:

  WITH ADOQuery1 DO bEGIN
    Close;
    Sql.Clear;
//    Sql.Add('SELECT * INTO ALEX FROM IN ""[Paradox 4.x;DATABASE=C:\CONTROLE\TABELAS\PRODUTOS;]"');
    Sql.Add('SELECT * INTO ALEX FROM IN "C:\CONTROLE\TABELAS\PRODUTOS" "Paradox 4.x;" ');
    ExecSQL
  End


I got an error from my "FROM"
0
ziolkoCommented:
"[DATABASE=C:\CONTROLE\TABELAS\CLIENTES.db;PWD=r74g78s]'''

assumes that clientes.db is another access file so it won't work
I tried other connection strings without luck,
I'll check your links

ziolko.
0
ziolkoCommented:
>>I got an error from my "FROM"

you don't have table name in your SQL
SELECT * INTO ALEX FROM <<here table name is missing>> IN "C:\CONTROLE\TABELAS\PRODUTOS" "Paradox 4.x;"

ziolko.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.