Sorry for my english, j'm an italian developer with some problems about using ADOCE under Wince 4.x.
J want to read an XLS file from my application:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim cn As New ADOCE.Connection
Dim adoRs As ADOCE.Recordset = New ADOCE.Recordset
Dim valore As String = Nothing
Dim strSQL As String = Nothing
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0?"
.ConnectionString = "Data Source=\storage card\Test.xls;Extended Properties=Excel 8.0?"
'.CursorLocation = CursorLocationEnum.adUseClient
.Open()
End With
strSQL = "SELECT * FROM [Sheet1$]"
With adoRs
.ActiveConnection = cn
.Open(strSQL)
.MoveFirst()
While Not .EOF
valore = adoRs(0).Value
.MoveNext()
End While
End With
cn.Close()
adoRs.Close()
End Sub
it give me back an error like this :
Impossibile creare l'oggetto COM con CLSID '{7727312D-B4AF-437B-9758-869ECE73A574}' a causa del seguente errore: 0x80040154.
Can you help me ?
Best regards
Edited by raptorhugo 2009-03-06 4:18 AM