Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > OLEDB unknown error in ASP.NET

Reply
Thread Tools

OLEDB unknown error in ASP.NET

 
 
GT
Guest
Posts: n/a
 
      06-18-2009
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(Ol eDbConnectionString
constr, OleDbConnection connection) +1131233

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

System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.RaisePostBackEven t(String eventArgument)
+107

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-18-2009
On Jun 18, 12:57*pm, GT <G...@discussions.microsoft.com> 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(Ol eDbConnectionString
> constr, OleDbConnection connection) +1131233
>
> System.Data.OleDb.OleDbConnectionFactory.CreateCon nection(DbConnectionOptio ns
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningObject) +53
>
> System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
> * *System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +47
> * *System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> * *System.Data.OleDb.OleDbConnection.Open() +37
> * *System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.RaisePostBackEven t(String eventArgument)
> +107
>
> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
> * *System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument) +11
> * *System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-18-2009
On Jun 18, 3:21*pm, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On Jun 18, 12:57*pm, GT <G...@discussions.microsoft.com> 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(Ol eDbConnectionString
> > constr, OleDbConnection connection) +1131233

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

>
> > System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
> > * *System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> > owningConnection) +47
> > * *System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> > outerConnection, DbConnectionFactory connectionFactory) +105
> > * *System.Data.OleDb.OleDbConnection.Open() +37
> > * *System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.RaisePostBackEven t(String eventArgument)
> > +107

>
> > System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
> > * *System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> > sourceControl, String eventArgument) +11
> > * *System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
 
Reply With Quote
 
GT
Guest
Posts: n/a
 
      06-18-2009
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/B...spx?BlogId=355, where the
solution is described.

Once again thanks a lot



"Alexey Smirnov" wrote:

> On Jun 18, 3:21 pm, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> > On Jun 18, 12:57 pm, GT <G...@discussions.microsoft.com> 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(Ol eDbConnectionString
> > > constr, OleDbConnection connection) +1131233

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

> >
> > > System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
> > > System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> > > owningConnection) +47
> > > System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> > > outerConnection, DbConnectionFactory connectionFactory) +105
> > > System.Data.OleDb.OleDbConnection.Open() +37
> > > System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.RaisePostBackEven t(String eventArgument)
> > > +107

> >
> > > System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
> > > System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> > > sourceControl, String eventArgument) +11
> > > System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
>

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-18-2009
On Jun 18, 5:24*pm, GT <G...@discussions.microsoft.com> 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/B...spx?BlogId=355, where the
> solution is described.
>
> Once again thanks a lot
>
>
>
> "Alexey Smirnov" wrote:
> > On Jun 18, 3:21 pm, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> > > On Jun 18, 12:57 pm, GT <G...@discussions.microsoft.com> 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(Ol eDbConnectionString
> > > > constr, OleDbConnection connection) +1131233

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

>
> > > > System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbCo nnection owningConnection, DbConnectionPoolGroup poolGroup) +27
> > > > * *System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> > > > owningConnection) +47
> > > > * *System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> > > > outerConnection, DbConnectionFactory connectionFactory) +105
> > > > * *System.Data.OleDb.OleDbConnection.Open() +37
> > > > * *System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.RaisePostBackEven t(String eventArgument)
> > > > +107

>
> > > > System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaiseP ostBackEvent(String eventArgument) +7
> > > > * *System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> > > > sourceControl, String eventArgument) +11
> > > > * *System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign an unknown value to an unknown variable Vincent Arnoux Ruby 1 08-11-2006 06:12 PM
Error in OLEDB Transaction Eitan ASP .Net 4 04-10-2005 02:56 AM
Error with ASP.NET opening OleDb/ODBC database Giuseppe D'Elia ASP .Net 2 07-25-2003 07:27 PM
Error when trying to add an Access DB Record containing a Long Integer type field using OLEDB in ADO.Net Robert Hanson ASP .Net 4 07-22-2003 01:40 PM
Re: Error when trying to add an Access DB Record containing a Long Integer type field using OLEDB in ADO.Net Robert Hanson ASP .Net 1 07-22-2003 12:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57