Re: [sqlite] ATTACH DATABASE how-to

2006-01-30 Thread Gerry Snyder

[EMAIL PROTECTED] wrote:


Hi all,

The situation is:
i have two DBs - one in memory and one in the filesystem. I
need to fill some tables in the second DB from the fist DB.
So, how can I ATTACH DATABASE from memory?
(unfortunately ATTACH DATABASE ":memory:" AS mem; fails ...)


It works for me.

How do you know it fails? Do you get an error message? If so, what???

Do you have one process creating the memory DB and another trying to 
access it?


More details are needed.

Gerry


Re: [sqlite] ATTACH DATABASE how-to

2006-01-30 Thread Derrell . Lipman
[EMAIL PROTECTED] writes:

> The situation is:
> i have two DBs - one in memory and one in the filesystem. I
> need to fill some tables in the second DB from the fist DB.
> So, how can I ATTACH DATABASE from memory?
> (unfortunately ATTACH DATABASE ":memory:" AS mem; fails ...)

You need to ATTACH the disk-resident database to the memory one, rather than
vice versa as you're trying.  Since you already have the database handle for
the memory-resident database, issue an "ATTACH 'diskdatabase.db' AS disk_db;"
command on the memory-resident database handle.

Derrell


[sqlite] ATTACH DATABASE how-to

2006-01-30 Thread emilia12


Hi all,

The situation is:
i have two DBs - one in memory and one in the filesystem. I
need to fill some tables in the second DB from the fist DB.
So, how can I ATTACH DATABASE from memory?
(unfortunately ATTACH DATABASE ":memory:" AS mem; fails ...)

Regards
E.

-

Slon.bg ™
Симпатичният магазин за
книги, DVD, игри и музика
http://www.slon.bg