Back-end Database connect string being set someplace where I can't find it.

EE experts: I have inherited maintenance responsibility for a MS-Access 2003 application written by a boy wonder mathematics genius who has written some pretty exotic code from which I have learned some useful lessons. But . . . . Some of his code has some very serious amateur programming errors in technique. Like hard coding the connect string to a back-end database in every occurrence where it is needed. I have been maintaining this application for 8 years. I haven't worked on it in 4 years and seemed to have forgotten everything I knew about it and MS-Access 2003.

When I double click the Front-end.mdb file in Windows Explorer the application runs and presents the RUN-TIME_ERROR-3044 screen shown below. When I click the "Debug" button on the Run-Time dialog box window DOCMD.OPENFORM opens with a yellow arrow showing the line of code that threw the exception. This tells me that the exception occurred somewhere in the "Orders" form. But I can not find anywhere in the "Orders" form where the back-end database is being connected to using the connect string in RUN-TIME_ERROR-3044.

If I start the application with alt-F11, I can set a break point where the application is throwing the exception. When I single step using F-8 it doesn't tell me anything. Is there somewhere that I don't know of where this connect string parameter is being set that I don't know about?

I have a previous version of the same application in another MDB file that works just fine but I can't find any differences between the next version that I am trying to create using the MDB file that I copied to a flash drive from a working Workstation when I was last at the client's business and the last version that I have on my development PC.
Run-time_error-3044.JPG
DoCmd.OpenForm.JPG
Ted PalmerInformation Technology ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
The connect path to a remote table is stored in a tabledefs connect property.

The simplest way to change that is using the linked table manager (Database tools).   Just select all the tables and point to the drive/directory where it resides.

But from your screen shot, it's currently set using the "H" drive.  So the other approach to get this running would be to map the path where the backend DB is to H

Jim.
0
Ted PalmerInformation Technology ConsultantAuthor Commented:
Jim,

"H:" is a drive letter that is mapped on all workstations to a share on a production server. When I make maintenance changes to my client's software, I don't have a server to connect to. So therefore for all occurrences of this connect string I comment out the production connect string and substitute a different connect string: "Set dbsHWbe = DBEngine.OpenDatabase("C:\Drv1\Ted's_Stuff\HollowWoodworks\MS-Access_0518\HW_be.mdb", False, False, "")"

I  have commented out the production connect string for all occurrences in the application and substituted the above connect string which works in all previous versions of the application. But for some reason it's not working here?

This is the production connect string that I have commented out all occurrences in the entire application:

'Set dbsHWbe = DBEngine.OpenDatabase("H:\HW_be.mdb", False, False, "")

Ted
0
Ted PalmerInformation Technology ConsultantAuthor Commented:
Jim,

I'll take a closer look at  linked table manager (Database tools).

Thank you for your help.

Ted
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Ted PalmerInformation Technology ConsultantAuthor Commented:
Jim,

I was not able to find the  linked table manager. This system is very old by today's standards. I saw some references to registry entries and a suggestion to reinstall.

Ted
0
John TsioumprisSoftware & Systems EngineerCommented:
I think you should start with the basics...does your BE working properly(compact/repair)...can you link/import tables from the BE without connection strings...plain manually...
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<When I make maintenance changes to my client's software, I don't have a server to connect to. >>

 Right, but if you don't currently have an "H" drive mapped on the machine your working on, then simply create one.

 Put the BE in a folder, share that folder, then create a mapping for it.   You won't have to change any connect strings that way.

<<I was not able to find the  linked table manager.>>

 This is 2003?

Jim.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<<<I was not able to find the  linked table manager.>>>>

  Tools, Database Utilities, Linked table manager in A2000/2003.

 This however will not change strings in code.  It will just change the .Connect property in the table definition.

 Jim.
0
Ted PalmerInformation Technology ConsultantAuthor Commented:
Jim,

< <Put the BE in a folder, share that folder, then create a mapping for it.   You won't have to change any connect strings that way.>>

<<The simplest way to change that is using the linked table manager (Database tools).   Just select all the tables and point to the drive/directory where it resides.>>

I did the above and it worked just fine. All seems well. I also now know how to find my linked table manager. Now I have to go back and take out all the commented code for swapping out the connect strings. This has been a good learning experience for me.

I haven't worked on this guy's software for 4 years. It has also been 4 years since I have done anything in MS-Access. Obviously I have forgotten a lot over those 4 years.

Your help has made all the difference in the world for me when it comes to working on this guy's software. I am very embarrassed about not thinking of the "sharing" and "drive letter mapping" trick. Those are the kinds of things that I used to do almost instinctively.

Thank you,
Ted Palmer
0
Ted PalmerInformation Technology ConsultantAuthor Commented:
Thank you. You  do great work.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<
I haven't worked on this guy's software for 4 years. It has also been 4 years since I have done anything in MS-Access. Obviously I have forgotten a lot over those 4 years.>>

 We all get rusty.   I'd hate to go back to VMS on a VAX right now<g>

 Glad to hear your set and of course you know where to come if you have questions<g>

Jim.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.