Subject | RE: [IBO] Datapump Question: What do i wrong? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-11-27T10:48:45Z |
Four years ago, I wrote a small program for transferring the content of tables from one database into another. Contact me privately if you want that source code to see whether it can help you out.
Set
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of saschaschilberz
Sent: 27. november 2008 11:30
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Datapump Question: What do i wrong?
Hi Helen,
thanks for your answer.
The way with
insert into tab1 (
Col1, Col2, etc (all the same columns)
values (:Col1, :Col2, :etc.....)
works by me.
That wasn't my prob.
But what i want is like
insert into tab1
select * from tab
because i have about 100 tables wich have to be pumped.
So i can do it easy in a loop without specifieing the fields.
Is it possible like that?
Sascha
Set
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of saschaschilberz
Sent: 27. november 2008 11:30
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Datapump Question: What do i wrong?
Hi Helen,
thanks for your answer.
The way with
insert into tab1 (
Col1, Col2, etc (all the same columns)
values (:Col1, :Col2, :etc.....)
works by me.
That wasn't my prob.
But what i want is like
insert into tab1
select * from tab
because i have about 100 tables wich have to be pumped.
So i can do it easy in a loop without specifieing the fields.
Is it possible like that?
Sascha
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 08:05 PM 27/11/2008, you wrote:
> >Hello all,
> >
> >i'm using IB Objects Components and now i want to do same things with
> >the TIB_DATAPUMP.
> >
> >I have read all the posts according to this component but still i
> >won't get it works for me.
> >
> >I use the delphi demo Datapump_demo from the files of this group.
> >
> >I have 2 databases - same Table structure.
> >DB1 is the source, DB2 the dest.
> >
> >For reading the source i use the tib_cursor, for writing the tib_dsql.
> >
> >my source statement= 'SELECT * FROM TAB'
> >my destination statement= 'insert into TAB SELECT * FROM TAB'
> >
> >after commiting my dest table ist still empty.
> >so i try the rename my dest tabel to tab1
> >
> >my source statement= 'SELECT * FROM TAB'
> >my destination statement= 'insert into TAB1 SELECT * FROM TAB'
> >
> >But now i get an error, because my tib_sql don't now the table "tab".
> >
> >I tried everything without success.
> >
> >So what do i wrong?
>
> Be prepared to do a little more typing! This way will bind the
source output data directly to the target input parameters:
>
> From the source database (use a tib_cursor for the SrcDataset
object and don't forget to prepare it before you begin)
> select Col1, Col2, etc (all the columns you want)
> from tab
>
> To the target database (use a tib_dsql for this and don't forget to
prepare it either!)
> insert into tab1 (
> Col1, Col2, etc (all the same columns)
> values (:Col1, :Col2, :etc.....)
>
> And do read the help file.
>
> Helen
>
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links