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?
 
ziolkoConnect With a Mentor Commented:
>>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
 
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
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
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
 
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
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
All Courses

From novice to tech pro — start learning today.