I 've trying to get data from excel sheet. the Programs works well in the development server but it doesn't in production server. but I'm sure It's not PERMISSION
My CODE
Try
Dim con As String
Dim _Dataset As New DataSet
Dim x As Integer
Dim Data As New DataTable
If Ruta <> "" Then
Dim com As New OleDbDataAdapter
con = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + Ruta + ";Extended Properties=Excel 8.0;"
If Not com Is Nothing Then
com = New OleDbDataAdapter("select * from [sheet1$]", con)
Else
Label1.Text = "nada"
End If
Label1.Text = "Antes del FILL"
com.Fill(_Dataset) 'Here the application goes down!!!
Label1.Text = "Después del FILL"
Data = _Dataset.Tables(0)
dgdMatrizRol.DataSource = _Dataset.Tables(0)
dgdMatrizRol.DataBind()
End If
Catch ex As Exception
Dim _msg As String
_msg = "m:" + ex.Message
_msg = _msg + " s: " + ex.Source
_msg = _msg + " t: " + ex.StackTrace.ToString
Label2.Text = _msg
End Try
The error Message
m:Unspecified error
s: Microsoft JET Database Engine
t: at System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvid er() at System.Data.OleDb.OleDbConnection.Open() at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState) at System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at Prueba.WebForm1.CargarDatosExcel(String Ruta) in C:\PROYECTOS\ERP\Prueba\WebForm1.aspx.
vb:line 103