Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adoce on 4.2 WINCE

Status
Not open for further replies.

raptorhugo

Programmer
Joined
Mar 6, 2009
Messages
1
Location
IT
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top