Avatar of fmichail
fmichail
Flag for Canada asked on

How to handle connection string for an ACCESS database if its path contains semicolon

I have a connection string for MS access database defined as follows:

        oAccessConnection.ConnectionString = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};", sMdbPath)

When trying to open it I get a problem caused by a semicolun in the sMDBPath. I need to keep these folders without renaming, How to prevent the connection from considering the semicolun as a connectionstring attributes separator, and deal with it as a normal character. Thanks
Visual Basic.NET

Avatar of undefined
Last Comment
Member_2_4913559

8/22/2022 - Mon
SOLUTION
kaufmed

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Member_2_4913559

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
fmichail

ASKER
Thanks this fixed the problem... I appreciate your help. I am going to split the points as both ddayx10 and kaufmed have the same solution.
Member_2_4913559

Well there was a difference in the code but I never mind sharing points with kaufmed.
Your help has saved me hundreds of hours of internet surfing.
fblack61