sql server - Unable to connect to SQL LocalDB -


I have a basic C + + app inside which I am trying to connect to local DB example using ADO I am By manually starting my example, I can run sqllocaldb info v11.0 and see that the database instance is running.

My code is as follows.

  ADO :: _ Connection PTR connection (__Eidof (ado :: connection)); SpConnection-> Open (L "Provider = SQLNCLI11; Server = (LocalDB) \\ v11.0; Integrated Security = True", L "", L "", 0); The error code is DB_E_ERRORSOCCURRED (0x80040e21) and error message  Multiple-phase OLE DB operation errors are generated. If available, check the value of each OLE DB status. No work was done.   

I have been able to successfully connect to the database using SQL Server Management Studio and I have tried to specify this with and without the connection string provider as well as an initial list.

I get my issue security should be set to sspi shown below.

  ADO :: _ Connection PTR spConnection (ADO :: Connection); SpConnection-> Open (L "Provider = SQLNCLI11; Server = (LocalDB) \\ v11.0; Integrated Security = SSPI", L "", L "", 0);    

Comments