I am trying to create a connection string which contains SQL login information for use in Excel
The connection string I have been using is:
Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=vw-AdventureWorks;Extended Properties=""
Which works fine, but when adding user/password fields, like this
Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=vw-AdventureWorks;User ID=[Id]@[server];Password=[password];Extended Properties=""
It throws an error stating the initialization of the database has failed, but the database is verified to be up and the string connects perfectly fine without the user/password fields
I solved my issue with the following connection string. I still don't know why the original one could not connect.
Server=tcp:[server].database.windows.net,1433;Data Source=[databasename];Initial Catalog=[database name];User ID=[Username];Password=[Password];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.