Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear sir,

i have using excel sheet for uploading data in database
code is

VB
Dim oconn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("~/IMEINO/IMEINO.xls") & ";Extended Properties=Excel 8.0")
Try
    Dim ocmd As New OleDbCommand("select * from [Sheet1$]", oconn)
    oconn.Open()
    Dim odr As OleDbDataReader = ocmd.ExecuteReader()

    Dim IMEINO As String = ""
    Dim Status As String = ""
    Dim ActivateDeactivate As String = ""
    While odr.Read()

        IMEINO = valid(odr, 0)
        Status = valid(odr, 1)
        ActivateDeactivate = valid(odr, 2)

        If IMEINO Is DBNull.Value Or IMEINO = "0" Then
            Exit While
        End If
        InsertIMEINOList(IMEINO, Status, ActivateDeactivate)


    End While
  

    oconn.Close()

its working fine but when i upload project on server then this error occurred.


:-The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.


help me

thanks in advance.
Posted

Check your server have 'Microsoft.Jet.OLEDB.4.0' provider is installed.(i faced the same problem with Windows 7).

if it is not there, install it.

Here[^]

Thanks
 
Share this answer
 
Comments
DINESH K MAURYA 23-Dec-11 2:18am    
thanks
If you are using IIS7 than you have to Enable 32-bit Application property.
More Info[^]
 
Share this answer
 
Comments
DINESH K MAURYA 23-Dec-11 2:18am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900