title: The OLE DB provider "MSDASQL" for linked server "(null)" reported an error
body: <p>I'm very very stuck here, help is greatly appreciated.
  What am I trying to do?</p>
  
  <p>There is an ASP-page (classic ASP) with a CSV upload that gives the following error:</p>
  
  <pre><code>Microsoft OLE DB Provider for SQL Server error '80040e14'
  
  The OLE DB provider "MSDASQL" for linked server "(null)" reported an error. The provider did not give any information about the error.
  
  /ùùù.stocklist.be/importCSVProcess.asp, line 86 
  </code></pre>
  
  <p>I have created two linked servers:</p>
  
  <pre><code>   EXEC master.dbo.sp_addlinkedserver
            @server = N'txtsrv'
          , @srvproduct=N'Jet 4.0'
          , @provider=N'Microsoft Text Driver (*.txt; *.csv)'
          , @datasrc=N'D:\WEBSITES\ùùù.stocklist.be\csv\upload'
          , @provstr=N'Text'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>            EXEC sp_addlinkedserver 
     @server = 'Server1', 
     @srvproduct = '',
     @provider = 'MSDASQL', 
     @datasrc = '
  </code></pre>
  
  <p>'</p>
  
  <p>When I replace MSDASQL by txtsrv in the following query I get this error:</p>
  
  <pre><code>The OLE DB provider "txtsrv" has not been registered.
  </code></pre>
  
  <p>This is the code where the insert is done:</p>
  
  <pre><code>If upl.Form("rdbType") = "lot" Then
              updFileNameSQL ="insert into cos_lot(lot_vin) " &amp; _
                      "SELECT vin  " &amp; _
                      "FROM OPENROWSET  " &amp; _
                      "('MSDASQL',  " &amp; _
                      "'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=" &amp; sServerPath &amp; ";',  " &amp; _
                      "'SELECT vin from " &amp; UplFileName &amp; "') " &amp; _
                      "where not vin IS NULL AND  vin collate SQL_Latin1_General_CP1_CI_AS not in (select  lot_vin from cos_lot) " 
  
  
      Set updCmd = Server.CreateObject("ADODB.Command")
          updCmd.ActiveConnection = MM_COS_STRING
          updCmd.CommandText = updFileNameSQL 
          updCmd.Execute
  ElseIf upl.Form("rdbType") = "premie" Then
      updFileNameSQL ="INSERT INTO [ùùùSTOCKLIST].[dbo].[COS_ANNEX] " &amp; _
                         "([annex_type] " &amp; _
                         ",[annex_chassisnr] " &amp; _
                         ",[annex_datum] " &amp; _
                         ",[annex_userid] " &amp; _
                         ",[annex_stockid] " &amp; _
                         ",[annex_commentNL] " &amp; _
                         ",[annex_commentFR] " &amp; _
                         ",[annex_premie] " &amp; _
                         ",[annex_premie_type] " &amp; _
                         ",[annex_consignatie] " &amp; _
                         ",[annex_eindeconsignatie] " &amp; _
                         ",[annex_online] " &amp; _
                         ",[annex_onlinefrom] " &amp; _
                         ",[annex_onlineto] " &amp; _
                         ",[annex_libelle]) " &amp; _
                          "SELECT 2 " &amp; _
                          ",[VIN] " &amp; _
                          ",Getdate() " &amp; _
                          ", " &amp; Session("user_id") &amp; " " &amp; _
                          ",[STOCK] " &amp; _
                          ",'' " &amp; _
                          ",'' " &amp; _
                          ",Replace([PREMIE],',','.') " &amp; _
                          ",'E' " &amp; _
                          ",Null " &amp; _
                          ",Null " &amp; _
                          ",1 " &amp; _
                          ",cast([ONLINEFROM] as smalldatetime) " &amp; _
                          ",cast([ONLINETO] as smalldatetime) " &amp; _
                          ",[TYPE]  " &amp; _
                          "FROM OPENROWSET  " &amp; _
                          "('MSDASQL',  " &amp; _
                          "'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=" &amp; sServerPath &amp; ";',  " &amp; _
                          "'SELECT vin,stock,type,premie,onlinefrom,onlineto from " &amp; UplFileName &amp; "') " &amp; _
                          "WHERE NOT VIN IS NULL "
  
      Set updCmd = Server.CreateObject("ADODB.Command")
          updCmd.ActiveConnection = MM_COS_STRING
          updCmd.CommandText = updFileNameSQL 
          updCmd.Execute
  End If
  </code></pre>
  
  <p>at the end: <strong>updCmd.Execute</strong> I get the above error.</p>
  
  <p>What could I be doing wrong?</p>
  
  <p>Thanks in advance!</p>
  
  <p>PS: server is Win2003 R2 x86</p>