Database Question 2

Just starting out? Need help? Post your questions and find answers here.
Maximus_Primal
User
User
Posts: 12
Joined: Sat Dec 18, 2004 7:01 pm
Location: England, UK
Contact:

Database Question 2

Post by Maximus_Primal »

Sorry if this is a stupid question but can you open more than one Database file at a time in Pure Basic? I need to access at least 2 or 3 seperate files for the program I am writing (to save having one large and overly complex database). Is this possible or do I need to open each one seperately as required for use at the time?

I am thinking you are limited to one at a time (especially with MDB library).

Can someone tell me if I am right.

Thanks

Max
Real Power Comes From Sharing With Those Who Think They Have It All!
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

You can open multiple database connections at once...

Code: Select all

Result = OpenDatabase(#Database1, ODBCDatabaseName$, User$, Password$) 
Result = OpenDatabase(#Database2, ODBCDatabaseName$, User$, Password$) 
Result = OpenDatabase(#Database3, ODBCDatabaseName$, User$, Password$) 
Maximus_Primal
User
User
Posts: 12
Joined: Sat Dec 18, 2004 7:01 pm
Location: England, UK
Contact:

Post by Maximus_Primal »

Oh right.... I was looking in the wrong place obviously. Sorry for asking such a stupid question and thanks for the simple answer.

Max
Real Power Comes From Sharing With Those Who Think They Have It All!
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

He who does not ask, will not find the answer ...

Note to myself: Quit drinking...
Post Reply