What to do about spaces on my connection string?
问题 For example: @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="\\na1b\uj\UP647529\Year 2\Managing Data and Security\Employee.accdb"; Visual studio won't let me run my program until I remove the spaces but thats where the database is.. How can I sort out that connection string to make Visual studio happy? 回答1: It looks more like the problem is with the quotation marks in the string literal. Try replacing each quote with two sets: @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""\\na1b\uj