Note that there are some explanatory texts on larger screens.

plurals
  1. POCSV files and OLEDB in VB.net - Exception with no info
    primarykey
    data
    text
    <p>I'm trying to parse a user-submitted csv file in ASP.NET with VB. Here is my function:</p> <pre><code>Public Function getData() As DataSet Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Path.GetTempPath() + ";Extended Properties=""Text;HDR=No;FMT=Delimited""" Dim cn As New OleDbConnection(conn) Dim cmd As New OleDbCommand("SELECT * FROM " + sourceFile, cn) Dim da As New OleDbDataAdapter(cmd) cn.Open() Dim dt As New DataSet() da.Fill(dt) cn.Close() Return dt End Function </code></pre> <p>the error I get is:</p> <pre><code>System.Data.OleDb.OleDbException was unhandled by user code </code></pre> <p>ErrorCode=-2147467259 Message=IErrorInfo.GetDescription failed with E_FAIL(0x80004005). Source=System.Data StackTrace: at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object&amp; executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&amp; executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object&amp; executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, 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 SuperSMITH.CSVReader.getData() in C:\Projects\Allied\App_Code\CSVReader.vb:line 29 at tools_Step2.uplFile_FileUploadComplete(Object sender, FileUploadCompleteEventArgs e) in C:\Projects\Allied\tools\Step2.aspx.vb:line 58 at DevExpress.Web.ASPxUploadControl.ASPxUploadControl.OnFileUploadComplete(FileUploadCompleteEventArgs e) at DevExpress.Web.ASPxUploadControl.ASPxUploadControl.RaiseFileUploadComplete(UploadedFile uploadedFile, String&amp; errorText, String&amp; callbackData) at DevExpress.Web.ASPxUploadControl.ASPxUploadControl.Validate() InnerException: </p> <p>The error comes up at the <code>da.fill(dt)</code> line.</p> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload