[RESOLVED] Variable in Connection String
My program asks the user for the location of the database and stores the location in the variable "filename"
I then have this:
Dim ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filename
but apparently I can't do that. What am I missing here?
Re: Variable in Connection String
You certainly can do that. A connection string is just a string, so how you build it is irrelevant. Of course, the end result has to be valid so, if it's not working, that would presumably be the reason.
Re: Variable in Connection String
I'm sorry. It was complaining about the & sign, and that made me not consider my "filename" variable being invalid. Thanks.