Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 27th, 2005, 11:08 PM
Registered User
 
Join Date: Nov 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default [OleDbException (0x80004005): IErrorInfo.GetDescri

Hi,
I can not insert the value to exsting item in table. The database based on microsoft acess. My code as follow:

Dim DbPath As String = Server.MapPath("database.mdb")
        Dim ConnStr As String
        ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DbPath & ";"
        Dim MyOleDbConn As New OleDbConnection(ConnStr)
        MyOleDbConn.Open()
dim sql_npvtpc as string
        sql_npvtpc = "SELECT output.Project_ID, output.TPCNPV FROM [output]"
        Dim MyOleDbCommand_npvtpc As New OleDbCommand(sql_npvtpc, MyOleDbConn)
        Dim da_npvtpc As New OleDbDataAdapter(MyOleDbCommand_npvtpc)
        Dim scb As New OleDbCommandBuilder(da_npvtpc)

        Dim tb_npvtpc As DataTable
        ds_npvtpc = New DataSet
        da_npvtpc.Fill(ds_npvtpc, "output")
        tb_npvtpc = ds_npvtpc.Tables("output")
        Dim dr_npvtpc As DataRow
        dr_npvtpc = ds_npvtpc.Tables(0).NewRow()

        ' input data to new row
        Dim npvtpc As Integer = 5
        dr_npvtpc.Item(0) = a 'session("project1")
        dr_npvtpc.Item("tpcnpv") = npvtpc
        ds_npvtpc.Tables(0).Rows.Add(dr_npvtpc)
        da_npvtpc.Update(ds_npvtpc, "output")

        MyOleDbConn.Close() 'Close connection



And the error message is as follows:

Server Error in '/DSS' Application.
--------------------------------------------------------------------------------

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Source Error:


Line 254: Dim tb_npvtpc As DataTable
Line 255: ds_npvtpc = New DataSet
Line 256: da_npvtpc.Fill(ds_npvtpc, "output")
Line 257: tb_npvtpc = ds_npvtpc.Tables("output")
Line 258: Dim dr_npvtpc As DataRow


Source File: C:\Inetpub\wwwroot\DSS\output.aspx.vb Line: 256

Stack Trace:


[OleDbException (0x80004005): IErrorInfo.GetDescription failed with E_FAIL(0x80004005).]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method)
   System.Data.OleDb.OleDbCommand.ExecuteReader(Comma ndBehavior behavior)
   System.Data.OleDb.OleDbCommand.System.Data.IDbComm and.ExecuteReader(CommandBehavior behavior)
   System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   DSS.output.test() in C:\Inetpub\wwwroot\DSS\output.aspx.vb:256
   DSS.output.output_back_ServerClick(Object sender, EventArgs e) in C:\Inetpub\wwwroot\DSS\output.aspx.vb:291
   System.Web.UI.HtmlControls.HtmlInputButton.OnServe rClick(EventArgs e)
   System.Web.UI.HtmlControls.HtmlInputButton.System. Web.UI.IPostBackEventHandler.RaisePostBackEvent(St ring eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
   System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


Please, please help me to cover this problem. Thank a ton


  #2 (permalink)  
Old December 27th, 2005, 02:31 AM
Registered User
 
Join Date: Dec 2005
Location: Johannesburg, Gauteng, South Africa.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had a similar encounter; I found those messages were being generated because of reserved field names being used (in my instance, one of my tables had a field called 'Status' which caused it return similar errors to yours.)

Try searching for perceived reserved field names, change them and try again.

There are 10 types of people in this world; those who understand binary, and those who don't
  #3 (permalink)  
Old January 5th, 2007, 03:11 PM
Registered User
 
Join Date: Jan 2007
Location: Mexico, D.F., Mexico, D.F., Mexico.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, guys:

I'm new in your forum. I have a problem very similar to the one posted by vandat but in my case I'm running an application in a Sybase DB. I have the following code:

using System;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Reflection;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;

[assembly: ApplicationName ( "DistributedTransaction" ) ]
[assembly: ApplicationActivation ( ActivationOption.Library ) ]

namespace TestEnterpriseServices
{
    [ Transaction ( TransactionOption.Required ) ]
    public class DistributedTransactionSybase : ServicedComponent
    {
        public DistributedTransactionSybase ()
        {
        }

        [ System.EnterpriseServices.AutoComplete() ]
        public void NewItem ()
        {
            OleDbConnection con = null;

            try
            {
                con = new OleDbConnection ( ConfigurationSettings.AppSettings["CnnSybase"] );
                con.Open ();
            }

            catch ( Exception e )
            {
                throw ( e );
            }
        }
    }
}

As you can see I don't have any queries, or operations that modify data. Nothing but a simple open method. When the application executes the open method I get the following error:

No error information available: E_FAIL(0x80004005).

I really don't understand what is causing this error. I've been searching the web for a while without any look! I really would appreciate any ideas to work around this problem.

Thank you.

  #4 (permalink)  
Old January 8th, 2007, 01:59 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The folks over on the MS forums might be able to help you better with this (I saw your post there as well) since this is extremely cryptic and I have no experience with Sysbase but one thing I would suggest is that you do something with your execption besides doing this:

throw(e);

This is 1) A bad way to control program flow and 2) One of the most resource intensive things you can do inside an application.

Hope you get your problem solved.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
  #5 (permalink)  
Old January 8th, 2007, 11:38 AM
Registered User
 
Join Date: Jan 2007
Location: Mexico, D.F., Mexico, D.F., Mexico.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, again:

Thank you four your advice regarding to the exception management. I handle this in that way because it is an application build in tiers. The code shown before corresponds to a dll on the business tier runing on the application server and I throw it to the presentation layer to display the message there. I don't know what else can I do in a dll runing on a server.

I don't expect that you or anyone else do my job, but it would be helpful if you give some advice (as the one you give with the exception). Thank you again.

  #6 (permalink)  
Old January 8th, 2007, 12:16 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ugg. My last post was somewhat vauge and you will have to forgive, it was late and I had been up way to long so my post came out a bit unclear and I just skimmed your code briefly.

Exception handling is expesnive no matter how you handle the exception and in this case you are doing everything effeciently as possible (also given your infastructure that is the best way).

Sorry for the confusion.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Data.OleDb.OleDbException: No value given f tjgrindsted ASP.NET 2.0 Basics 0 January 24th, 2007 07:25 AM
System.Data.OleDb.OleDbException: Expected query n Thac Classic ASP Databases 0 July 3rd, 2005 01:48 PM
OleDbException (0x80004005): Confused ASP.NET 1.0 and 1.1 Basics 13 April 24th, 2004 11:21 PM



All times are GMT -4. The time now is 05:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.