Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Move tables from a folder to another
Mon, Nov 3 2008 10:11 AMPermanent Link

"Rocco Neri"
Sorry for the silly question, but I'm new with ElevateDB that is
question:
Using windows copy and paste I moved some tables from a folder to
another of an existent Databases but EDBManager don't show the added
tables.
What is the easy way to see the tables on EDBManager database?

TIA
Rocco

--
Mon, Nov 3 2008 10:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rocco


If you were used to DBISAM, BDE etc its totally different in ElevateDB. The table metadata is all stored in the catalog. The files you are referring to ONLY hold the data none of the table definitions. What you have to do is add the tables to the catalog. There are two ways of doing it.

1. Go into EDBManager select the database, select tables, select add table and add the table definitions making sure you use the same name as the files on disk.

2. If these files are from another database. Go into EDBManager, select the source database, reverse engineer it, edit the sql to just leave the tables you're interested in, copy that sql to the database you've moved the tables to and execute it.

I don't know of any easier way.

Roy Lambert [Team Elevate]
Mon, Nov 3 2008 12:43 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rocco,

<< Using windows copy and paste I moved some tables from a folder to another
of an existent Databases but EDBManager don't show the added tables.

What is the easy way to see the tables on EDBManager database? >>

You can't just move some tables around with an EDB database.   You either
have to copy all of the table files (.edbtbl, .edbidx, .edbblb, and .edbpbl)
and catalog file (.edbcat) to a new database directory, or you need to copy
the tables in code by using something like this SQL (execute each statement
separately using the TEDBDatabase.Execute method where the
TEDBDatabase.DatabaseName points to the target database):

CREATE TABLE MyTable
(...Add structure here
)

Insert INTO MyTable
SELECT * FROM MyExistingDatabase.MyTable

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Nov 3 2008 12:52 PMPermanent Link

"Rocco Neri"

Roy
thanks for your reply

Roy Lambert wrote:

> Rocco
>
>
> If you were used to DBISAM, BDE etc its totally different in
> ElevateDB. The table metadata is all stored in the catalog. The files
> you are referring to ONLY hold the data none of the table
> definitions. What you have to do is add the tables to the catalog.
> There are two ways of doing it.
>
> 1. Go into EDBManager select the database, select tables, select add
> table and add the table definitions making sure you use the same name
> as the files on disk.


That's is very hard work because here you have to write manually all
the fields definition of the tables.


>
> 2. If these files are from another database. Go into EDBManager,
> select the source database, reverse engineer it, edit the sql to just
> leave the tables you're interested in, copy that sql to the database
> you've moved the tables to and execute it.

That's more easy but generate troubles in case the table are not in
another database.



>
> I don't know of any easier way.
>
> Roy Lambert [Team Elevate]


Ciao
Rocco

--
Tue, Nov 4 2008 12:49 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rocco

>> 1. Go into EDBManager select the database, select tables, select add
>> table and add the table definitions making sure you use the same name
>> as the files on disk.
>
>That's is very hard work because here you have to write manually all
>the fields definition of the tables.

Yup isn't it.

>> 2. If these files are from another database. Go into EDBManager,
>> select the source database, reverse engineer it, edit the sql to just
>> leave the tables you're interested in, copy that sql to the database
>> you've moved the tables to and execute it.
>
>That's more easy but generate troubles in case the table are not in
>another database.

If they're not then its not an ElevateDB table!

Roy Lambert [Team Elevate]
Image