Source language: Translate to:

Can NB dbPro open an Access Database exclusive?

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Can NB dbPro open an Access Database exclusive?

Postby Enigman » Mon Oct 13, 2014 10:04 pm

I would like to eliminate the appearance of the ".ldb" file when I open my access database with my program. I have heard that opening the database in exclusive mode will not create the ".ldb" file. My program will never share the data or at least it is not intended to share. Is it possible for dbPro to open the database in exclusive mode?

Failing that, is there a way to redirect the location of the ".ldb" file so I can bury it in an obscure location?

I don't want to provide a hint that my database type is Access. The ".ldb" is nicely branded with an MS Access icon that gives it away.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Can NB dbPro open an Access Database exclusive?

Postby dpayer » Tue Oct 14, 2014 8:40 am

Enigman wrote:I would like to eliminate the appearance of the ".ldb" file when I open my access database with my program. I have heard that opening the database in exclusive mode will not create the ".ldb" file. My program will never share the data or at least it is not intended to share. Is it possible for dbPro to open the database in exclusive mode?

Failing that, is there a way to redirect the location of the ".ldb" file so I can bury it in an obscure location?

I don't want to provide a hint that my database type is Access. The ".ldb" is nicely branded with an MS Access icon that gives it away.

Thanks.


Would setting the attribute to hidden do what you want?

attrib +h filename.ldb
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Can NB dbPro open an Access Database exclusive?

Postby Neosoft Support » Tue Oct 14, 2014 10:14 am

You can open an Access database in exclusive mode by using dbpOpenDatabase instead of dbpOpenAccessDatabase. The dbpOpenDatabase action allows you to specify a custom connection string used to open the database. For example, the following will open an Access database in exclusive mode:

dbpOpenDatabase "ID" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\path\yourdatabase.mdb;Mode=Share Exclusive"

Replace the file name (in red) with the name of your database file.

More information about MS Access connection strings can be found here:

http://www.connectionstrings.com/access/
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Can NB dbPro open an Access Database exclusive?

Postby Enigman » Tue Oct 14, 2014 10:57 am

For example, the following will open an Access database in exclusive mode:

dbpOpenDatabase "ID" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\path\yourdatabase.mdb;Mode=Share Exclusive"

How sensitive is the Microsoft.Jet.OLEDB.4.0 part? What if they are on XP and maybe they don't have 4.0 is there a way to know or downshift to an earlier version or is that even what the 4.0 means? Also I use a password plus encryption. I didn't see much on the referenced article about encryption. Without that I may up introducing more problems than I solve. Looking at the article this seems like a world of slippery spagetti.

I think I would have to check for errors opening and then downshift to dbpOpenAccessDatabase in case the database didn't open, but I'm not sure if I would be able to reliably trap that.

???
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Can NB dbPro open an Access Database exclusive?

Postby dpayer » Tue Oct 14, 2014 11:27 am

Enigman wrote:
For example, the following will open an Access database in exclusive mode:

dbpOpenDatabase "ID" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\path\yourdatabase.mdb;Mode=Share Exclusive"

How sensitive is the Microsoft.Jet.OLEDB.4.0 part? What if they are on XP and maybe they don't have 4.0 is there a way to know or downshift to an earlier version or is that even what the 4.0 means? Also I use a password plus encryption. I didn't see much on the referenced article about encryption. Without that I may up introducing more problems than I solve. Looking at the article this seems like a world of slippery spagetti.

I think I would have to check for errors opening and then downshift to dbpOpenAccessDatabase in case the database didn't open, but I'm not sure if I would be able to reliably trap that.

???


There is a way to check for the installed ODBC drivers via VB script (this link refrences another which may help http://stackoverflow.com/questions/1113 ... -using-vba)

You can look for the most common versions and then use the discovered one in your connection script.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Can NB dbPro open an Access Database exclusive?

Postby Neosoft Support » Wed Oct 15, 2014 10:40 am

How sensitive is the Microsoft.Jet.OLEDB.4.0 part?


DBPro's built-in OpenAccessDatabase action uses "Microsoft.Jet.OLEDB.4.0" in the connection string it generates, and we haven't had any problems on XP.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Can NB dbPro open an Access Database exclusive?

Postby Enigman » Wed Oct 15, 2014 11:03 am

DBPro's built-in OpenAccessDatabase action uses "Microsoft.Jet.OLEDB.4.0" in the connection string it generates, and we haven't had any problems on XP.

Okay, so then am I safe adding my normal password parameter? And it won't have a problem with an Access encrypted database?

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Can NB dbPro open an Access Database exclusive?

Postby Neosoft Support » Thu Oct 16, 2014 10:10 am

Okay, so then am I safe adding my normal password parameter? And it won't have a problem with an Access encrypted database?


That's what DBPro uses internally when connecting to MS Access databases, so I believe that it's safe to use and will work with encrypted databases. Of course, for mission critical applications, there is no substitute for testing as much as possible.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 0 guests

cron