database connectivity ?

I have 2 databases in the project settings:

1 = Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True
the above is MY database everything seems to be OK - SQL  Server data

2 = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\genxxxx\Sxxxxo\sxxxro.mdb - oledb connection
the  above I have access to and can modify, etc as long as NO SCREW UPS OCCUR
I cannot move (TO ANOTHER FOLDER/SERVER) or otherwise
I have set both to "DO NOT COPY" in the data base properties and I have read and understand (I THINK) although obviously not very well (THE DEBUG COPING ROUTINE HERE) because in the "SERVER EXPLORER" during these final debug sessions I keep getting a copy of the 2nd database being put into the
data directory of the 1st database and I don't understand why and can't even compile my code without a copy being there?

Could someone clue me in on what's going on here - this concern's me because I'm getting close to releasing this app?
And if you haven't already guessed it's my first APP of any worthwhile note, so I'm still a novice with VB or any type of programming for that matter
Who is Participating?

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

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.

Look in Visual Studio at the 'Copy to Output Directory' property of your second dbfile.  Make sure that it is set to 'Do not copy'.  For Example -Capture.JPG-saige-

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
MBHEY131Author Commented:
yes as I mentioned above I have them both set to "DO NOT COPY" in the database properties, I did notice the full path of the 2nd database is set to the directory of the 1st database - I think it has something to do with the DATADIRECTORY setting but I don't know what or even how to change it.
No the DATADIRECTORY in the connection string wouldn't cause this.  It is basically a place holder.  And I missed where you mentioned that you checked this settings.  My apologies.

Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

What about the Build Action.  What is this set to?

MBHEY131Author Commented:
content on both!
MBHEY131Author Commented:
The Property has to be set to ""Copy if Newer"
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
Microsoft SQL Server

From novice to tech pro — start learning today.