OLEDB unknown error in ASP.NET

Discussion in 'ASP .Net' started by GT, Jun 18, 2009.

  1. GT

    GT Guest

    Hello

    ASP.NET 2.0 trying to load CSV-File via OLEDB

    Impersonation is on, Basic-HTTP Authentication.

    It only works when the logged on user is an andministrator.
    ASPNET-Account and also the normal user-account has full rights on the
    folder containing the csv-file.

    Any help would be great

    Thanks


    Source:
    string path2CSV = @"D:\temp\";
    OleDbConnection oConn = new
    OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
    "Data Source=" + path2CSV + ";" +
    "Extended Properties=\"text;HDR=YES;FMT=Delimited\"");

    OleDbDataAdapter oCmd = new OleDbDataAdapter("select * from
    payments.csv", oConn);

    DataSet dsCSV = new DataSet();
    oCmd.Fill(dsCSV);

    Here the error is thrown:


    Error Message/Stack Trace:

    [OleDbException (0x80004005): Unbekannter Fehler]
    System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
    constr, OleDbConnection connection) +1131233

    System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
    options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
    owningObject) +53

    System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    owningConnection) +47
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory) +105
    System.Data.OleDb.OleDbConnection.Open() +37
    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
    IDbCommand command, CommandBehavior behavior) +121
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
    behavior) +137
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
    payments_check.btnUpload_Click(Object sender, EventArgs e) in
    d:\vs2005prj\NovaX\NovaWeb\payments_check.aspx.cs:68
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    +107

    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
     
    GT, Jun 18, 2009
    #1
    1. Advertising

  2. On Jun 18, 12:57 pm, GT <> wrote:
    > Hello
    >
    > ASP.NET 2.0 trying to load CSV-File via OLEDB
    >
    > Impersonation is on, Basic-HTTP Authentication.
    >
    > It only works when the logged on user is an andministrator.
    > ASPNET-Account and also the normal user-account has full rights on the
    > folder containing the csv-file.
    >
    > Any help would be great
    >
    > Thanks
    >
    > Source:
    >             string path2CSV = @"D:\temp\";
    >             OleDbConnection oConn = new
    > OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
    >             "Data Source=" + path2CSV + ";" +
    >             "Extended Properties=\"text;HDR=YES;FMT=Delimited\"");
    >
    >             OleDbDataAdapter oCmd = new OleDbDataAdapter("select * from
    > payments.csv", oConn);
    >
    >             DataSet dsCSV = new DataSet();
    >             oCmd.Fill(dsCSV);
    >
    > Here the error is thrown:
    >
    > Error Message/Stack Trace:
    >
    > [OleDbException (0x80004005): Unbekannter Fehler]
    >    System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
    > constr, OleDbConnection connection) +1131233
    >
    > System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptio ns
    > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
    > owningObject) +53
    >
    > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
    >    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    > owningConnection) +47
    >    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    > outerConnection, DbConnectionFactory connectionFactory) +105
    >    System.Data.OleDb.OleDbConnection.Open() +37
    >    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    > DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
    > IDbCommand command, CommandBehavior behavior) +121
    >    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
    > behavior) +137
    >    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
    >    payments_check.btnUpload_Click(Object sender, EventArgs e) in
    > d:\vs2005prj\NovaX\NovaWeb\payments_check.aspx.cs:68
    >    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    >    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    > +107
    >
    > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
    >    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +11
    >    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    >    System.Web.UI.Page.ProcessRequestMain(Boolean
    > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


    Hallo,

    check if you have TEMP (or TMP) environment variable defined on the
    server. I think OLEDB creates a temporary file in the directory
    specified by one of these variables. If directory does not exist or
    has no permissions, than it will not work for a normal user.

    Hope this helps
     
    Alexey Smirnov, Jun 18, 2009
    #2
    1. Advertising

  3. On Jun 18, 3:21 pm, Alexey Smirnov <> wrote:
    > On Jun 18, 12:57 pm, GT <> wrote:
    >
    >
    >
    >
    >
    > > Hello

    >
    > > ASP.NET 2.0 trying to load CSV-File via OLEDB

    >
    > > Impersonation is on, Basic-HTTP Authentication.

    >
    > > It only works when the logged on user is an andministrator.
    > > ASPNET-Account and also the normal user-account has full rights on the
    > > folder containing the csv-file.

    >
    > > Any help would be great

    >
    > > Thanks

    >
    > > Source:
    > >             string path2CSV = @"D:\temp\";
    > >             OleDbConnection oConn = new
    > > OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
    > >             "Data Source=" + path2CSV + ";" +
    > >             "Extended Properties=\"text;HDR=YES;FMT=Delimited\"");

    >
    > >             OleDbDataAdapter oCmd = new OleDbDataAdapter("select * from
    > > payments.csv", oConn);

    >
    > >             DataSet dsCSV = new DataSet();
    > >             oCmd.Fill(dsCSV);

    >
    > > Here the error is thrown:

    >
    > > Error Message/Stack Trace:

    >
    > > [OleDbException (0x80004005): Unbekannter Fehler]
    > >    System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
    > > constr, OleDbConnection connection) +1131233

    >
    > > System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptio ns
    > > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
    > > owningObject) +53

    >
    > > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
    > >    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    > > owningConnection) +47
    > >    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    > > outerConnection, DbConnectionFactory connectionFactory) +105
    > >    System.Data.OleDb.OleDbConnection.Open() +37
    > >    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    > > DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
    > > IDbCommand command, CommandBehavior behavior) +121
    > >    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    > > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
    > > behavior) +137
    > >    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
    > >    payments_check.btnUpload_Click(Object sender, EventArgs e) in
    > > d:\vs2005prj\NovaX\NovaWeb\payments_check.aspx.cs:68
    > >    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    > >    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    > > +107

    >
    > > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
    > >    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > > sourceControl, String eventArgument) +11
    > >    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    > >    System.Web.UI.Page.ProcessRequestMain(Boolean
    > > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

    >
    > Hallo,
    >
    > check if you have TEMP (or TMP) environment variable defined on the
    > server. I think OLEDB creates a temporary file in the directory
    > specified by one of these variables. If directory does not exist or
    > has no permissions, than it will not work for a normal user.
    >
    > Hope this helps


    To check (English Windows):

    Control Panel - System - Advanced - Environment Variables
     
    Alexey Smirnov, Jun 18, 2009
    #3
  4. GT

    GT Guest

    Hello,

    thanks for your answer, was a hint in the right direction. It didn't help to
    change the ACL on the TMP/TEMP for the system nor for the loggend on user. I
    found an other link,
    http://www.c-sharpcorner.com/Blogs/BlogDetail.aspx?BlogId=355, where the
    solution is described.

    Once again thanks a lot



    "Alexey Smirnov" wrote:

    > On Jun 18, 3:21 pm, Alexey Smirnov <> wrote:
    > > On Jun 18, 12:57 pm, GT <> wrote:
    > >
    > >
    > >
    > >
    > >
    > > > Hello

    > >
    > > > ASP.NET 2.0 trying to load CSV-File via OLEDB

    > >
    > > > Impersonation is on, Basic-HTTP Authentication.

    > >
    > > > It only works when the logged on user is an andministrator.
    > > > ASPNET-Account and also the normal user-account has full rights on the
    > > > folder containing the csv-file.

    > >
    > > > Any help would be great

    > >
    > > > Thanks

    > >
    > > > Source:
    > > > string path2CSV = @"D:\temp\";
    > > > OleDbConnection oConn = new
    > > > OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
    > > > "Data Source=" + path2CSV + ";" +
    > > > "Extended Properties=\"text;HDR=YES;FMT=Delimited\"");

    > >
    > > > OleDbDataAdapter oCmd = new OleDbDataAdapter("select * from
    > > > payments.csv", oConn);

    > >
    > > > DataSet dsCSV = new DataSet();
    > > > oCmd.Fill(dsCSV);

    > >
    > > > Here the error is thrown:

    > >
    > > > Error Message/Stack Trace:

    > >
    > > > [OleDbException (0x80004005): Unbekannter Fehler]
    > > > System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
    > > > constr, OleDbConnection connection) +1131233

    > >
    > > > System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptio ns
    > > > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
    > > > owningObject) +53

    > >
    > > > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
    > > > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    > > > owningConnection) +47
    > > > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    > > > outerConnection, DbConnectionFactory connectionFactory) +105
    > > > System.Data.OleDb.OleDbConnection.Open() +37
    > > > System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    > > > DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
    > > > IDbCommand command, CommandBehavior behavior) +121
    > > > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    > > > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
    > > > behavior) +137
    > > > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
    > > > payments_check.btnUpload_Click(Object sender, EventArgs e) in
    > > > d:\vs2005prj\NovaX\NovaWeb\payments_check.aspx.cs:68
    > > > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    > > > System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    > > > +107

    > >
    > > > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
    > > > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > > > sourceControl, String eventArgument) +11
    > > > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    > > > System.Web.UI.Page.ProcessRequestMain(Boolean
    > > > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

    > >
    > > Hallo,
    > >
    > > check if you have TEMP (or TMP) environment variable defined on the
    > > server. I think OLEDB creates a temporary file in the directory
    > > specified by one of these variables. If directory does not exist or
    > > has no permissions, than it will not work for a normal user.
    > >
    > > Hope this helps

    >
    > To check (English Windows):
    >
    > Control Panel - System - Advanced - Environment Variables
    >
     
    GT, Jun 18, 2009
    #4
  5. On Jun 18, 5:24 pm, GT <> wrote:
    > Hello,
    >
    > thanks for your answer, was a hint in the right direction. It didn't help to
    > change the ACL on the TMP/TEMP for the system nor for the loggend on user.. I
    > found an other link,http://www.c-sharpcorner.com/Blogs/BlogDetail.aspx?BlogId=355, where the
    > solution is described.
    >
    > Once again thanks a lot
    >
    >
    >
    > "Alexey Smirnov" wrote:
    > > On Jun 18, 3:21 pm, Alexey Smirnov <> wrote:
    > > > On Jun 18, 12:57 pm, GT <> wrote:

    >
    > > > > Hello

    >
    > > > > ASP.NET 2.0 trying to load CSV-File via OLEDB

    >
    > > > > Impersonation is on, Basic-HTTP Authentication.

    >
    > > > > It only works when the logged on user is an andministrator.
    > > > > ASPNET-Account and also the normal user-account has full rights on the
    > > > > folder containing the csv-file.

    >
    > > > > Any help would be great

    >
    > > > > Thanks

    >
    > > > > Source:
    > > > >             string path2CSV = @"D:\temp\";
    > > > >             OleDbConnection oConn = new
    > > > > OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
    > > > >             "Data Source=" + path2CSV + ";" +
    > > > >             "Extended Properties=\"text;HDR=YES;FMT=Delimited\"");

    >
    > > > >             OleDbDataAdapter oCmd = new OleDbDataAdapter("select * from
    > > > > payments.csv", oConn);

    >
    > > > >             DataSet dsCSV = new DataSet();
    > > > >             oCmd.Fill(dsCSV);

    >
    > > > > Here the error is thrown:

    >
    > > > > Error Message/Stack Trace:

    >
    > > > > [OleDbException (0x80004005): Unbekannter Fehler]
    > > > >    System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
    > > > > constr, OleDbConnection connection) +1131233

    >
    > > > > System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptio ns
    > > > > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
    > > > > owningObject) +53

    >
    > > > > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
    > > > >    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    > > > > owningConnection) +47
    > > > >    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    > > > > outerConnection, DbConnectionFactory connectionFactory) +105
    > > > >    System.Data.OleDb.OleDbConnection.Open() +37
    > > > >    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    > > > > DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
    > > > > IDbCommand command, CommandBehavior behavior) +121
    > > > >    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    > > > > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
    > > > > behavior) +137
    > > > >    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
    > > > >    payments_check.btnUpload_Click(Object sender, EventArgs e) in
    > > > > d:\vs2005prj\NovaX\NovaWeb\payments_check.aspx.cs:68
    > > > >    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    > > > >    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    > > > > +107

    >
    > > > > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
    > > > >    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > > > > sourceControl, String eventArgument) +11
    > > > >    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    > > > >    System.Web.UI.Page.ProcessRequestMain(Boolean
    > > > > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

    >
    > > > Hallo,

    >
    > > > check if you have TEMP (or TMP) environment variable defined on the
    > > > server. I think OLEDB creates a temporary file in the directory
    > > > specified by one of these variables. If directory does not exist or
    > > > has no permissions, than it will not work for a normal user.

    >
    > > > Hope this helps

    >
    > > To check (English Windows):

    >
    > > Control Panel - System - Advanced - Environment Variables


    glad it works now for you
     
    Alexey Smirnov, Jun 18, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Giuseppe D'Elia

    Error with ASP.NET opening OleDb/ODBC database

    Giuseppe D'Elia, Jul 15, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,434
    John Toop
    Jul 25, 2003
  2. Mathew Vording

    asp.net ms-access oledb connection open error

    Mathew Vording, Aug 15, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,173
    Mathew Vording
    Aug 15, 2003
  3. Manuel Arroba
    Replies:
    0
    Views:
    2,069
    Manuel Arroba
    Jun 28, 2004
  4. =?Utf-8?B?cGV0cm8=?=
    Replies:
    5
    Views:
    4,379
    =?Utf-8?B?cGV0cm8=?=
    Nov 21, 2005
  5. Vincent Arnoux
    Replies:
    1
    Views:
    251
    Arnaud Bergeron
    Aug 11, 2006
Loading...

Share This Page