title: Error 440 in Visual Basic Application
body: <p>There is an old VB application running at one of my clients.
  An exception is throws in this peice of code:</p>
  
  <pre><code>cn=GetIndexDatabaseConnectionString()
  sSql="SELECT * FROM Arh_Naroc WHERE StNarocila = '" &amp; isci &amp; "'"                            
  rs=CreateObject("ADODB.Recordset")
  Call rs.Open(sSql,cn)
  </code></pre>
  
  <p>The exception happens in <code>rs.Open()</code> function. "Error number 440 occured."</p>
  
  <p>This are SBL scripts for KOFAX engine and it's many years old.
  The whole SW was transferred from old XP computer to Windows 7 and looks like there are problems everywhere.</p>
  
  <p>Can some one help me determine what is the problem here. At least if I could get a proper error message back in msgbox would be most helpful.</p>
  
  <p>EDIT:
  This is the connection string function.</p>
  
  <pre><code>Function GetIndexDatabaseConnectionString
   Dim objXmlDocument As Object
   Dim objXmlGlobalSettingsFileParh As Object
   Dim objXmlIndexDatabaseConnectionString As Object
   Dim strGlobalSettingsFilePath As String
   Dim strTemp As String
   Const strSettingsFilePath = "C:\Data\LocalDocsDistibutingSystem\Settings.xml"
   Set objXmlDocument = CreateObject("MSXML2.DOMDocument")
   objXmlDocument.Load strSettingsFilePath
   Set objXmlGlobalSettingsFileParh = objXmlDocument.selectSingleNode("DocsDistributingSystem/GlobalSettingsFilePath")
   strGlobalSettingsFilePath = objXmlGlobalSettingsFileParh.childNodes(0).Text
   Set objXmlGlobalSettingsFileParh = Nothing
   Set objXmlDocument = Nothing
   Set objXmlDocument = CreateObject("MSXML2.DOMDocument")
   objXmlDocument.Load strGlobalSettingsFilePath
   Set objXmlIndexDatabaseConnectionString = objXmlDocument.selectSingleNode("DocsDistibutingSystem/AscentCapture/IndexDatabase/ConnectionString")
   strTemp = objXmlIndexDatabaseConnectionString.childNodes(0).Text
   Set objXmlIndexDatabaseConnectionString = Nothing
   Set objXmlDocument = Nothing
   GetIndexDatabaseConnectionString = strTemp
  End Function
  </code></pre>
  
  <p>This is the relevant line from Settings.xml:</p>
  
  <pre><code>&lt;ConnectionString&gt; Provider=OraOLEDB.Oracle;Data Source=LINO2;User Id=****;Password=****;OLEDB.NET=True; &lt;/ConnectionString&gt;
  </code></pre>
  
  <p>The real data is masked with *. The connection to Oracle appears to be ok. I created ODBC and linked server to sql using the provider and connection data. It works. It must be something missing installed on the computer for ADODB to work...</p>
  
  <p>The connection appears to be working OK. There is no error when its initialized.
  The error happens in Call rs.Open(sSql, cn). All i want is the detailed error message when the error happens...
  Many thanks.</p>