erro E_NOINTERFACE(0x80004002).

  • Thread starter Thread starter TJS
  • Start date Start date
T

TJS

getting this error message when trying to open oledb connection to read a
delimited file

E_NOINTERFACE(0x80004002).

I have the schema.ini file in the folder with the delimited text file

what's missing ?

====code====
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>

.....
Dim oCon As OleDBConnection = new OleDBConnection
Dim Adapter as OleDBDataAdapter = new OleDBDataAdapter

Dim strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & vFolderPath & ";" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited"""
oCon.ConnectionString = strConnect

Adapter.selectCommand= new OleDbCommand("SELECT * FROM [" & vFileName &
"]",oCon)
Adapter.selectCommand.Connection.Open

Dim ds As New DataSet()
Adapter.Fill(ds)

.....
 
Back
Top