UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Dev. Environment Overridden, Access 2016    
 
   
OCM
post Jan 22 2018, 10:47 AM
Post#1



Posts: 154
Joined: 12-September 02
From: Eastern, USA


Hi,

I’ve a split db that I copied both be/fe from dev. environment to a different folder, renamed it as SampleDB, modified the table (deleted records) so I can post a strip down version of the DB in the forum. I just noticed records on my dev. environment also been modified as my (SampleDB).
Can you please tell me what went wrong and how to proceed with this in the future, i.e copy a split db (be/fe) to a different location to modify and post sample db on the forum?

How do I get the two tables I modified back to dev. environment?

TIA

Regards,
Go to the top of the page
 
Doug Steele
post Jan 22 2018, 11:08 AM
Post#2


UtterAccess VIP
Posts: 22,006
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Realistically, the only way this could have happened is if you didn't remember to change the linkage between your front-end and back-end database, so that you were actually deleting the data from your development back-end instead of your copied back-end.

Unfortunately, it's unlikely that there's any way you'll be able to recover your back-end. frown.gif
Go to the top of the page
 
RJD
post Jan 22 2018, 11:18 AM
Post#3


UtterAccess VIP
Posts: 9,242
Joined: 25-October 10
From: Gulf South USA


Hi: Actually, if you copied the BE to the new location and remained linked to the old location, then the BE in the new location (which is not linked to anything now) should contain the original tables. Look there. If they are there you can copy that BE to the old location to recover the original tables. Fingers crossed that this is the case and you can recover.

Then you can switch the BEs and make sure the links are correct for the new location.

HTH
Joe
Go to the top of the page
 
OCM
post Jan 22 2018, 11:29 AM
Post#4



Posts: 154
Joined: 12-September 02
From: Eastern, USA


Thanks Doug,
Correct, I don’t remember changing the linkage.
1. What steps do I need to take to change the linkage?
2. I make a backup of my dev. environment a while ago. Can I import (or copy/paste) those tables I modified from the backup copy to my dev. environment?

I try to stay out of the production environment to avoid this types of issues.

TIA

Regards,
Go to the top of the page
 
OCM
post Jan 22 2018, 12:01 PM
Post#5



Posts: 154
Joined: 12-September 02
From: Eastern, USA


Joe, thanks.

QUOTE
if you copied the BE to the new location and remained linked to the old location
rename to the old location?
Can you please elaborate which BE to copy, BE from dev environment, or BE from SampleDB which is copied from dev. environment & modified?

TIA

Regards,
Go to the top of the page
 
Doug Steele
post Jan 22 2018, 12:04 PM
Post#6


UtterAccess VIP
Posts: 22,006
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Joe's right. Since you didn't delete the data from the copied back-end, it should the same as what you had before! If not, then yes, you should be able to import the tables from another database. Note that unless you delete the old tables first, importing the tables will add a number to their names.

One way change the linkage in Access 2016 is to use the Linked Table Manager on the External Data tab (the Linked Table Manager exists in all versions of Access: it's found in different places in different versions of Access, which is why I specifically mentioned Access 2016!)
Go to the top of the page
 
RJD
post Jan 22 2018, 01:40 PM
Post#7


UtterAccess VIP
Posts: 9,242
Joined: 25-October 10
From: Gulf South USA


Okay, let's see if I can be more specific...

(You should back up all the subject files before starting this, so you can recover if necessary)

1. In dev environment, rename the BE to add "Rev" at the end of the file name.
2. In dev environment, move the renamed BE to SampleDB.
3. In SampleDB, move the original (not renamed) BE to dev environment.

At this point your dev environment FE should open the correct BE with the tables intact.

4. In SampleDB, open the FE and, using the Linked Table Manager (as Doug pointed out) re-point to the BE tables in SampleDB location - the one with "Rev" appended to the name.
5. In SampleDB, in the FE, open something (such as a form) that will verify that you are linked to the appropriate revised table(s).

Now you should be good to go. With the SampleDB BE renamed, you should not have a problem mixing the BEs.

It might also be a good idea to rename the SampleDB FE as well, so as not to mix it up with the development version.

Let us know how this goes ...

HTH
Joe
Go to the top of the page
 
JonSmith
post Jan 22 2018, 02:11 PM
Post#8



Posts: 3,989
Joined: 19-October 10



In the future a good way to prevent this is restrict your access for test and dev to different accounts providing only read access to one and write to the other at the same time. That way if any steps were missed like relinking then the permissions handle it.
Go to the top of the page
 
Doug Steele
post Jan 22 2018, 02:42 PM
Post#9


UtterAccess VIP
Posts: 22,006
Joined: 8-January 07
From: St. Catharines, ON (Canada)


How would you suggest doing such a restriction, Jon, given the OP's dealing with an Access backend, using Access 2016?
Go to the top of the page
 
JonSmith
post Jan 22 2018, 07:44 PM
Post#10



Posts: 3,989
Joined: 19-October 10



Does Access 2016 have a special consideration I'm not aware of Doug?

In terms of in Access 2013 its easy, you have Dev folder and test folder. You also have Dev user and Test user.
The dev user has write access to dev folder only. Test user has read to dev folder and write to test.
When you want to copy to test user the test user and copy it over, if you fail to relink the tables the test user cannot write the data, dev cannot open any files copied to test.
Go to the top of the page
 
Doug Steele
post Jan 22 2018, 09:20 PM
Post#11


UtterAccess VIP
Posts: 22,006
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Just trying to see how you envisioned controlling it. (I was afraid you were proposing Access User Security!)

I suppose having to use separate user ids for development versus test is legitimate (although I'd hate to have to do it!)
Go to the top of the page
 
JonSmith
post Jan 23 2018, 02:58 AM
Post#12



Posts: 3,989
Joined: 19-October 10



We have stricter requirements here at my company, in finance we have alot of regulations we need to follow after all those bankers messed up and crashed.
Now you have to prove you are really in control about everything and we need strict separation of our DTAP (Dev, Test, Acceptance, Production).
Whilst I agree it can be annoying to switch user id's it doesn't take long and really protects different environments. We are actually working on implementing new software to make migrating between environments more consistent easier and secure so the setup I detailed is the most basic easist one to do.
Go to the top of the page
 
Doug Steele
post Jan 23 2018, 08:01 AM
Post#13


UtterAccess VIP
Posts: 22,006
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Now that you mention it, I guess that's actually how we had it too (I retired 5 years ago, plus I was in a non-development job for quite a few years before that!) I did have separate IDs for development and testing.

In our case, when you logged in, certain drives would automatically be mapped. IIRC, data was always on the J: drive, so the back-end would be something like J:\MyApp\MyBackend.accdb regardless which environment you were in, meaning your front-end would always be pointing to the correct location!
Go to the top of the page
 
JonSmith
post Jan 23 2018, 09:57 AM
Post#14



Posts: 3,989
Joined: 19-October 10



Exactly what we do with M:\ at my current employer, I still always do relative pathing and relink my database automatically just incase but in theory I also don't need to change the paths between Dev, Test and Acceptance.

JS
Go to the top of the page
 
OCM
post Jan 23 2018, 12:37 PM
Post#15



Posts: 154
Joined: 12-September 02
From: Eastern, USA


Thanks both for your feedback.

Couple of things prior to applying Joe’s step by step instruction:
I realized what I did during the copy process. i.e. from the development (BE/FE) I only copied the FE to my sampleDB and updated two tables. As you explained, since I forgot to change the linkage, the FE in sampleDB was still pointing to the Dev. environment BE.

1. Can I still apply Joe’s step by step solution in this case?

2. Since I only modified two tables, I renamed the two tables (old) in dev. FE, and copied those tables from production and paste as linked table to my Dev. environment. However, when I attempted to run existing queries/reports etc. I get nothing (blank)

Do I need to use external data > from databases > Access instead to bring over the two tables I modified?

TIA

Regards,
Go to the top of the page
 
RJD
post Jan 23 2018, 01:15 PM
Post#16


UtterAccess VIP
Posts: 9,242
Joined: 25-October 10
From: Gulf South USA


QUOTE
I only copied the FE to my sampleDB and updated two tables. As you explained, since I forgot to change the linkage, the FE in sampleDB was still pointing to the Dev. environment BE.

Well, if you only copied the FE, then it looks like there is only one BE. And any change made from either the dev environment FE OR the sampleDB FE will affect the only BE you have. That means my step-by-step procedure will not work. Are you sure there is no BE in the sampleDB folder?

QUOTE
I renamed the two tables (old) in dev. FE, and copied those tables from production and paste as linked table to my Dev. environment. However, when I attempted to run existing queries/reports etc. I get nothing (blank)

Hmmm... renaming the tables in the FE does not change anything in the BE. And you cannot do a simple copy of tables that are in the BE while you are in the FE. Looks that this is pretty well messed up. I am not at all surprised you are getting nothing from your reports and queries.

Please check and see if you might have copied the BE into your SampleDB folder. If not, and you changed tables and/or deleted data, and there is no backup before you started this, then, oops, looks like the old tables might well be gone for good.

Also, look in the BE in the dev environment to make sure the tables are still there (probably sans data) with the original names. Then re-link from the two FEs to the tables. But it looks like the data may be gone for good if you did not copy the BE to the SampleDB folder.

But perhaps I am just confused by your last post and you need to explain more ...

HTH
Joe
Go to the top of the page
 
OCM
post Jan 23 2018, 02:42 PM
Post#17



Posts: 154
Joined: 12-September 02
From: Eastern, USA


Joe, thanks and sorry for the confusion.
QUOTE
Please check and see if you might have copied the BE into your SampleDB folder

Unfortunately, I didn’t copy the BE to the SampleDB folder.
QUOTE
Also, look in the BE in the dev environment to make sure the tables are still there…

The tables are still there, but with data modified. I also noted a + to the left of the table (view mode).
QUOTE
…But it looks like the data may be gone for good if you did not copy the BE to the SampleDB folder.

As per my screenshot, is it possible to import the two tables either from a backup and or from live BE to make my Dev. environment functional?

I attached a screenshot so you may have a better idea what is going on so you can direct me to the right path.

TIA

Regards,
Go to the top of the page
 
OCM
post Jan 23 2018, 02:57 PM
Post#18



Posts: 154
Joined: 12-September 02
From: Eastern, USA


Sorry about the attachment...Attached File  Screenshot2.zip ( 82.19K )Number of downloads: 7
Go to the top of the page
 
RJD
post Jan 23 2018, 09:43 PM
Post#19


UtterAccess VIP
Posts: 9,242
Joined: 25-October 10
From: Gulf South USA


Hi again: If the BE in the dev environment folder is what you what in SampleDB folder, and the BE in the Admin folder contains the two tables you want in the dev environment folder, then this process should do what you want ...

(FIRST, make copies of BOTH BEs in their respective folders - with added "copy" in the name of course.)

1. Move the BE in the Dev folder to the Sample folder.
2. Re-link the FE in the Sample folder to the BE now in the Sample folder (using the Linked Table Manager, as previously discussed).

Now you have a functioning sample set.

If you want ALL the tables in the BE in the Admin folder...

3. Copy the Admin BE to the Dev folder (NOT MOVE, just copy). The FE link in the Dev folder should still be good, since it points to the BE in that folder.

OR, if you just want a few tables, not all, you could, in step 1, copy instead of move, then ...

3.alt. Open the BE in the Dev folder, delete the tables you want anew from Admin, then Import the tables from the Admin BE.

That should do it ...

Just open the Dev FE and verify it has the data you want. Close, then open the FE in Sample and make sure the data you deleted is still gone.

HTH
Joe
Go to the top of the page
 
WildBird
post Jan 23 2018, 11:05 PM
Post#20


UtterAccess VIP
Posts: 3,482
Joined: 19-August 03
From: Auckland, Little Australia


My standard approach is I have a frmOpen and frmMain.

frmOpen has code that reads from an .ini file (same name as the .accdb or mdb file and has a number of entries in, including Back end path and Back end database name).

I use UNC paths, not drive letters. When it is relinking, I have a splash screen that shows the name of the table being relinked. A bit slower, but users dont mind, shows it is working basically. On the main form, I usually have a textbox that displays the BEPath, so I can quickly see if it is Test or whatever (often conditional format it as well so can see at a glance)

I have my front end sitting on a network share and each user has a shortcut that points to a file that copies the front end down to the users local drive, as well as the ini file.

Easier to explain with a whiteboard and in person, but works well and easy to administer once setup.
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search


RSSSearch   Top   Lo-Fi    17th December 2018 - 02:09 PM