title: sqljdbc_auth.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
body: <p>I am trying to connect to SQL Server 2008 from JAVA code using JDBC sql server with IntegratedSecurity to use Windows Authentication. </p>
  
  <p>SQL authentication worked fine with the code but when I use IntegratedSecurity for Windows Authentication, I am facing sql driver issues. I have provided the brief scenario below.</p>
  
  <blockquote>
    <p><strong>Java Code</strong></p>
  </blockquote>
  
  <pre><code>import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.Statement;
  
    public class Sqlselection 
      {
          public static void main(String[] args)
          {
              try
              {
                  Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
       System.out.println("This programe runs on "+ System.getProperty("java.version"));
  
                 String url="jdbc:sqlserver://*****\\*****;integratedSecurity=true";
                 //Masked Server name &amp; DB name
                  Connection con = DriverManager.getConnection(url);
                  Statement s1 = con.createStatement();
           ResultSet rs = s1.executeQuery("SELECT count(1) myrecords FROM dbo.mytable");
                  String[] result = new String[20];
                  if(rs!=null){
                      while (rs.next()){
                          for(int i = 0; i &lt;result.length ;i++)
                          {
                              for(int j = 0; j &lt;result.length;j++)
                              {
                                  result[j]=rs.getString(i);
                              System.out.println(result[j]);
                          }
                          }
                      }
                  }
  
              } catch (Exception e)
              {
                  e.printStackTrace();
              }
      }
  
  
  }
  </code></pre>
  
  <blockquote>
    <p><strong>Error while running the code</strong></p>
  </blockquote>
  
  <p><strong>WARNING:</strong> Failed to load the sqljdbc_auth.dll cause : E:\POC\OMSChecker\sqljdbc_auth.dll: <strong>Can't load AMD 64-bit .dll on a IA 32-bit platform</strong>
  *<em>com.microsoft.sqlserver.jdbc.SQLServerException:</em>* This driver is not configured for integrated authentication. ClientConnectionId:27af9d19-d144-47be-b9cf-bf646ed9bb3f</p>
  
  <blockquote>
    <p><strong>Issue root cause</strong></p>
  </blockquote>
  
  <p>sqljdbc_auth.dll is not compatible with current platform.</p>
  
  <blockquote>
    <p><strong>System properties</strong></p>
  </blockquote>
  
  <p>C:\Users>java -version</p>
  
  <p>java version "1.6.0_25"</p>
  
  <p>Java(TM) SE Runtime Environment (build 1.6.0_25-b06)</p>
  
  <p>Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)</p>
  
  <blockquote>
    <p><strong>Eclipse properties</strong></p>
  </blockquote>
  
  <p><strong>launcher:</strong> win32.x86_64_1.1.200.v20120913-144807</p>
  
  <p><strong>Used dll:</strong> E:\sqljdbc_2.0.1803.100_enu.exe\sqljdbc_2.0\enu\auth\x64\sqljdbc_auth.dll</p>
  
  <p><strong>Added External Jar:</strong> sqljdbc4.jar</p>
  
  <p><strong>Native library location:</strong> "E:\sqljdbc_2.0.1803.100_enu.exe\sqljdbc_2.0\enu\auth\x64\"</p>
  
  <blockquote>
    <p><strong>Notes</strong></p>
  </blockquote>
  
  <p>Can someone kindly help me with the fix. I am new to JAVA coding and I have tried all the solutions given for similar kind of posts.</p>