FE / BE trick

  • Thread starter alpapak via AccessMonster.com
  • Start date
A

alpapak via AccessMonster.com

FE / BE trick
------------------------------------------------------------------------------
--

hi
i have my BE (BE.mdb) and FE (FE.mdb) save at the same drive.
i want to hide my BE from users so i have rename it BE.mdb to autoexel.dll .
my BE is store at the c:\windows\Be.mdb and my FE at the desktop.

i want to write a code so when i open my FE to rename my autoexel.dll to BE.
mdb and when i close or exit FE to rename from BE.mdb to autoexel.dll.

sorry for my english

thxs
 
A

Alex Dybenko

Hi,
I think you can do this, but before renaming on close - you have to close
all forms/reports, close all references to DB object, so your BE will not be
locked. this is a main issue, you have to carefully look at this
 
A

alpapak via AccessMonster.com

I will open my FE with a startup form and place the code there
i need the code??

Alex said:
Hi,
I think you can do this, but before renaming on close - you have to close
all forms/reports, close all references to DB object, so your BE will not be
locked. this is a main issue, you have to carefully look at this
FE / BE trick
------------------------------------------------------------------------------
[quoted text clipped - 13 lines]
 
A

Alex Dybenko

Yes, you first have to rename BE and then start relink process and open
forms.

BTW - why do you need to rename BE? you can just link tables to
autoexel.dll, if this is MDB file

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


alpapak via AccessMonster.com said:
I will open my FE with a startup form and place the code there
i need the code??

Alex said:
Hi,
I think you can do this, but before renaming on close - you have to close
all forms/reports, close all references to DB object, so your BE will not
be
locked. this is a main issue, you have to carefully look at this
FE / BE trick
------------------------------------------------------------------------------
[quoted text clipped - 13 lines]
 
A

alpapak via AccessMonster.com

autoexel.dll is a dll but after i rename it to .mdb file
i can't link to a .dll
so i will start my FE and a splash screen will open and i code will rename my
..dll to .mdb.
next my splash screen will close and my main form will open
when i close the main form , a close form (something like splash screen )will
open and i code will rename my .mdb to .dll.

Dblclick the file===> Splash Screen ==> MainForm===>CloseForm
open FE Code run
BE is close(all objects are close)
BE is close rename BE
and code run to rename
(autoexel.dll) (autoexel.dll==>BE.mdb) (BE.
mdb==>autoexel.dll)
 
A

alpapak via AccessMonster.com

autoexel.dll is a dll but after i rename it to .mdb file
i can't link to a .dll
so i will start my FE and a splash screen will open and i code will rename my
..dll to .mdb.
next my splash screen will close and my main form will open
when i close the main form , a close form (something like splash screen )will
open and i code will rename my .mdb to .dll.

Dblclick the file===> Splash Screen ==> MainForm===>CloseForm
open FE Code run BE is
close(all objects are close)
BE is close rename BE and code
run to rename
(autoexel.dll) (autoexel.dll==>BE.mdb) (BE.mdb==>autoexel.
dll)
 
A

alpapak via AccessMonster.com

autoexel.dll is a dll but after i rename it to .mdb file
i can't link to a .dll
so i will start my FE and a splash screen will open and i code will rename my
..dll to .mdb.
next my splash screen will close and my main form will open
when i close the main form , a close form (something like splash screen )will
open and i code will rename my .mdb to .dll.

Dblclick the file=> Splash Screen => MainForm===>CloseForm
open FE Code run BE is close(all
objects)
BE is close rename BE and code run to rename
(autoexel.dll) (autoexel.dll=>BE.mdb) (BE.mdb==>autoexel.dll)
 
A

Alex Dybenko

IMHO, from Access point of view there is not difference what extension
database file has, if this is really MDB file
 
B

Brian Wilson

Alex Dybenko said:
IMHO, from Access point of view there is not difference what extension
database file has, if this is really MDB file


Exactly - there is no point in re-naming before opening. Just open it
whatever the extension is.

Having said that, I wonder how much security really is improved - changing
the extension doesn't sound that sophisticated and runs the risk of somebody
doing something unexpected with it - perhaps better to remove the extension
entirely.
 
W

Wayne Morgan

If all you're doing is "renaming" the file, then it is NOT a dll type of
file. It is just an mdb file with a name that ends in dll. Access doesn't
care what the file name is, just what the file's internal structure is.

Renaming a file doesn't change the type of file. The only thing that is
changed is the file's name. Windows Explorer however, looks at the files
name, not what's in the file, when determining how to handle the file. So in
Explorer, the file may "look" like a dll, but it isn't.
 
A

alpapak via AccessMonster.com

No , i want to change the extenssion from .mdb to .dll so it will not be open
if someone find it.
i know that it is not the best but it is something trick.

Wayne said:
If all you're doing is "renaming" the file, then it is NOT a dll type of
file. It is just an mdb file with a name that ends in dll. Access doesn't
care what the file name is, just what the file's internal structure is.

Renaming a file doesn't change the type of file. The only thing that is
changed is the file's name. Windows Explorer however, looks at the files
name, not what's in the file, when determining how to handle the file. So in
Explorer, the file may "look" like a dll, but it isn't.
autoexel.dll is a dll but after i rename it to .mdb file
i can't link to a .dll
[quoted text clipped - 12 lines]
rename
(autoexel.dll) (autoexel.dll=>BE.mdb) (BE.mdb==>autoexel.dll)
 
W

Wayne Morgan

Changing the extension from mdb to dll won't prevent the file from being
opened if someone finds it. It will only prevent them from double clicking
on the file to open it. If they open Access first, go to File|Open, select
All Files in the Files Type box, and browse to that file, they will still be
able to open it.

Changing the extension of the file also won't prevent the person who finds
the file from just renaming it back then opening it.
 
A

Albert D.Kallal

alpapak via AccessMonster.com said:
No , i want to change the extenssion from .mdb to .dll so it will not be
open
if someone find it.
i know that it is not the best but it is something trick.

Yes...and you *should* have no problem linking to that .dll as your back
end. You will have to roll your own linking code, but just everyone does
that anyway....

And, if the program freezes, or is killed by a improper machine
shutdown..your file will be in the wrong name state.

I would just link to the backend as a .dll....(so, just leave the file
extension as .dll..and do NOT change it). I suppose when you need to work on
the back end, you could re-name it so ms-access can open it.

However, your own linking code can link to a .dll.....

You can find the code to do this here

http://www.mvps.org/access/tables/tbl0009.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top