1. Multiple databases open at once?

Okay, this is the first time I have tried this but...

Is it possible to have two or more databases open at the same time? 

ie

db_open(database1)
-- do some stuff
db_open(database2)

I am getting an DB_OPEN_FAIL open open of database2!

TIA,

Jonas

new topic     » topic index » view message » categorize

2. Re: Multiple databases open at once?

Hi Jonas,
Yes you can open as many Databases as you like. Heres a snippet from one of
my progs.

    if db_open("Codes", DB_LOCK_EXCLUSIVE) != DB_OK then
        puts(2, "Couldn't Open Codes database!\n")
        abort(1)
    end if
    if db_open("CodeTrak", DB_LOCK_EXCLUSIVE) != DB_OK then
        puts(2, "Couldn't Open Tracker database!\n")
        abort(1)
    end if

Then select the database before you use it with db_select("Codes")

Regards
Tony Steward

Come Visit Me At www.locksdownunder.com

----- Original Message -----
From: "Jonas Temple" <jktemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Sent: Friday, April 20, 2001 6:04 AM
Subject: Multiple databases open at once?


>
>
> Okay, this is the first time I have tried this but...
>
> Is it possible to have two or more databases open at the same time?
>
> ie
>
> db_open(database1)
> -- do some stuff
> db_open(database2)
>
> I am getting an DB_OPEN_FAIL open open of database2!
>
> TIA,
>
> Jonas
>
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu