title: How to create connection string to connect ax database in x++ of ax 7
body: <p>I wrote code to connect ax database using SqlSystem class to create connectionstring. but it worked on developer environment not on production environment. How can I create database connection string so that work on both developer as well as production server. My code is as below :</p>
  
  <pre><code> public str getConnectionString()
  {
      var sqlInfo = SysSQLSystemInfo::construct();
      var loginServer = sqlInfo.getLoginServer();
      var loginDatabase = sqlInfo.getLogInDataBase();
      return strFmt('Server=%1;Database=%2;Trusted_Connection=true',loginServer,loginDatabase);
  }
  </code></pre>
  
  <p>Thanks,<br/>
  Sandy</p>