title: Oracle error: TNS: Listener was not given the SERVICE_NAME in CONNECT_DATA
body: <p>I have installed Oracle 11 G client(Administrator option) in my machine Windows 7 64 bit.</p>
  
  <p>This the path of the oracle home</p>
  
  <pre><code>C:\app\anoop2\product\11.2.0\client_1
  </code></pre>
  
  <p>"Path" of environment variables are also pointing to </p>
  
  <pre><code>C:\app\anoop2\product\11.2.0\client_1\bin;
  C:\app\anoop2\product\11.2.0\client_1;
  </code></pre>
  
  <p>Now, though i am able to connect to server through my SQL developer, i am not able to connect it using VB 6. This is the code i am using </p>
  
  <blockquote>
  <pre><code>Dim aConn As ADODB.Connection
   Set aConn = New ADODB.Connection
   aConn.Open "PROVIDER=MSDAORA.1;PASSWORD=XXX;User ID=XXX;Data Source=XXX;Persist Security Info=True"
  </code></pre>
  </blockquote>
  
  <p>This is my tnsnames.ora file</p>
  
  <blockquote>
    <p>DEV =   (DESCRIPTION = (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = XXX)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = DEV)
        )   )</p>
  </blockquote>
  
  <p>I am not able to find a listener file in my machine. I am getting an error "TNS: Listener was not given the SERVICE_NAME in CONNECT_DATA". Any pointers and suggestions are really appreciated.</p>
  
  <p>Thanks,
  Anoop</p>