|
-
Mar 15th, 2010, 07:49 AM
#1
Thread Starter
Member
[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?
-
Mar 15th, 2010, 08:04 AM
#2
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.
-
Mar 15th, 2010, 08:07 AM
#3
Thread Starter
Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|