Source language: Translate to:

Database Alias

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Database Alias

Postby Wrangler » Thu Jun 14, 2007 1:36 pm

In NeoDB, we had define alias. How would we accomplish the same thing with NeoDB Pro using access databases?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Gaev » Thu Jun 14, 2007 2:07 pm

Wrangler:

From the (work in progress) Help file ...
To open an existing Access database, simply pass the file name to NeoBookDBPro's dbpOpenAccessDatabase action. For example, opening a file called "AddressBook.mdb" located in the "c:\my documents" folder would look like this:

dbpOpenAccessDatabase "MyDB" "c:\my files\AddressBook.mdb" ""

The first parameter "MyDB" is the Database ID, which is simply the name that you want to use to refer to this database in the future.

... and ...
To open or connect to most other types of databases, you will use an action called dbpOpenDatabase which requires something called a Connection String.

The connection string is used to specify the information needed to connect to the database server. Connection strings can be tricky because they are often different depending on what type of server/ODBC driver you're using. The string consists of one or more elements required to establish the connection. Specify multiple elements as a list with individual elements separated by semicolons. For example, the command to open a MySQL database looks like this:

dbpOpenDatabase "MyDB" "Provider=MSDASQL.1;Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=test;User=root;Password=apple;Option=3"

The first parameter "MyDB" is the Database ID, which is simply the name that you want to use to refer to this database in the future.

Unlike NeoBookDB, the Alias (known as "Database ID") is part of the command to open the database ... wish it had been so with NeoBookDB too ... but its too late for that now.
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Wrangler » Thu Jun 14, 2007 2:20 pm

Thanks, Gaev. I can see it now. I guess I've got to lose the "NeoDB" train of thought. And I've been so busy trying out all the great stuff we can do now, I wasn't paying much attention to how it all worked.

What I'm really enjoying now is the ability to add, drop fields and tables on the fly. A whole different way of thinking.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 0 guests

cron