title: Connecting to local database (SQL Server ) in c++
body: <p>I have a database connection to SQL Server using c++. I am trying to connect to localdb instance which I created in my SQL Server Management Studio, and  the name of database is "filingdb", server is "(localdb)\filing". I copied the code from some other site and trying to query, the problem which I am facing is here as I have shared the error list:</p>
  
  <pre><code>Error   8   error C2440: '=' : cannot convert from 'System::Data::SqlClient::SqlCommandBuilder *' to 'System::Data::SqlClient::SqlCommandBuilder ^' 143 1   cvtest
  Error   6   error C2440: '=' : cannot convert from 'System::Data::SqlClient::SqlDataAdapter *' to 'System::Data::SqlClient::SqlDataAdapter ^'   139 1   cvtest
  Error   4   error C2440: 'initializing' : cannot convert from 'System::Data::DataSet *' to 'System::Data::DataSet ^'    126 1   cvtest
  Error   2   error C2440: 'initializing' : cannot convert from 'System::Data::SqlClient::SqlConnection *' to 'System::Data::SqlClient::SqlConnection ^'  125 1   cvtest
  Error   3   error C2750: 'System::Data::DataSet' : cannot use 'new' on the reference type; use 'gcnew' instead  126 1   cvtest
  </code></pre>
  
  <p><strong><code>System::Data::SqlClient::SqlCommandBuilder</code>' this is the major issue which I am facing</strong> </p>
  
  <p>I have tried other ways too, but I am still getting the same error </p>
  
  <pre><code>Error   12  error C2440: '=' : cannot convert from 'System::Data::SqlClient::SqlCommandBuilder *' to 'System::Data::SqlClient::SqlCommandBuilder ^' 140 1   cvtest
  Error   10  error C2440: '=' : cannot convert from 'System::Data::SqlClient::SqlDataAdapter *' to 'System::Data::SqlClient::SqlDataAdapter ^'   136 1   cvtest
  Error   6   error C2440: 'initializing' : cannot convert from 'System::Data::DataSet *' to 'System::Data::DataSet ^'    126 1   cvtest
  Error   3   error C2440: 'initializing' : cannot convert from 'System::Data::SqlClient::SqlConnection *' to 'System::Data::SqlClient::SqlConnection ^'  125 1   cvtest
  Error   5   error C2750: 'System::Data::DataSet' : cannot use 'new' on the reference type; use 'gcnew' instead  126 1   cvtest
  Error   11  error C2750: 'System::Data::SqlClient::SqlCommandBuilder' : cannot use 'new' on the reference type; use 'gcnew' instead 140 1   cvtest
  Error   2   error C2750: 'System::Data::SqlClient::SqlConnection' : cannot use 'new' on the reference type; use 'gcnew' instead 125 1   cvtest
  Error   9   error C2750: 'System::Data::SqlClient::SqlDataAdapter' : cannot use 'new' on the reference type; use 'gcnew' instead    136 1   cvtest
  </code></pre>
  
  <p>Can any one please offer advice on how to solve this problem, any other method of connection, and can any one suggest any good link for future use to register connecting database using SQL Server?</p>