I NEED HELP...about vb.net!!!!


Server Error in '/ShoppingCart' 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 119:        Dim dr As OleDbDataReader
Line 120:        cnn1.Open()
Line 121:        cmd1.ExecuteNonQuery()
Line 122:        dr = cmd1.ExecuteReader()
Line 123:        Dim orderid As String

Source File: c:\inetpub\wwwroot\ShoppingCart\Checkout.aspx.vb    Line: 121

Stack Trace:

[OleDbException (0x80004005): IErrorInfo.GetDescription failed with E_FAIL(0x80004005).]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   ShoppingCart.Checkout.cfm_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\ShoppingCart\Checkout.aspx.vb:121
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Here is my codings:

Private Sub cfm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cfm.Click


Dim a As String = Session("FName")

Dim b As String = Session("LName")

Dim c As String = Session("PayType")

Dim d As String = Session("CCNumber")

Dim ed As String = Session("EDate")

Dim f As String = Session("Address")

Dim g As String = Session("PCode")

Dim h As String = Session("CNumber")

Dim i As String = Session("Email")

Dim strSQL As String = "INSERT INTO CustDetails(FName, LName, PayType, CCNumber, EDate, Address, PCode ,CNumber ,Email) VALUES('" + a + "','" + b + "','" + c + "','" + d + "','" + ed + "','" + f + "','" + g + "','" + h + "','" + i + "')"

Dim cmd As New OleDbCommand(strSQL, cnn)






Dim cnn1 As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source =C:\Inetpub\wwwroot\ShoppingCart\Db\Db.mdb")

Dim strSQL1 As String = " Select OrderID, ProductName, Size, Qty, UnitPrice , PurchaseDate FROM CustDetails o, Cart ct WHERE o.LoginName= ct.LoginName AND ct.LoginName='" + Session("LoginName") + "' AND OrderID=(SELECT LAST(OrderID) FROM CustDetails)"

Dim cmd1 As New OleDbCommand(strSQL1, cnn1)

Dim dr As OleDbDataReader



dr = cmd1.ExecuteReader()

Dim orderid As String

Dim prodName As String

Dim qty As String

Dim UnitPrice As String

Dim pDate As String

Dim size As String

While dr.Read

orderid = dr("OrderID")

prodName = dr("ProductName").ToString

qty = dr("Qty").ToString

UnitPrice = dr("UnitPrice").ToString

pDate = dr("PurchaseDate").ToString

size = dr("Size").ToString

Dim cnn2 As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Inetpub\wwwroot\ShoppingCart\Db\Db.mdb")

Dim strSQL5 As String = "INSERT INTO [Order](ProductName , Qty , Size , UnitPrice, PurchaseDate, OrderID) VALUES(@pn, @q, @s, @up , @pd , @oi)"

Dim cmd2 As New OleDbCommand(strSQL5, cnn2)

cmd2.Parameters.Add(New OleDbParameter("@pn", prodName))

cmd2.Parameters.Add(New OleDbParameter("@q", qty))

cmd2.Parameters.Add(New OleDbParameter("@s", size))

cmd2.Parameters.Add(New OleDbParameter("@up", UnitPrice))

cmd2.Parameters.Add(New OleDbParameter("@pd", pDate))

cmd2.Parameters.Add(New OleDbParameter("@oi", orderid))




End While




End Sub

CAN ANYONE TELL MI WATS WRONG?????very urgent matter!!!

8/26/2005 11:32:04 AM
asp.net.object-datasource 16182 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 2

Size is a reserved word.  Try:

Dim strSQL1 As String = " Select OrderID, ProductName, [Size], Qty, UnitPrice , PurchaseDate FROM CustDetails o, Cart ct WHERE o.LoginName= ct.LoginName AND ct.LoginName='" + Session("LoginName") + "' AND OrderID=(SELECT LAST(OrderID) FROM CustDetails)"

Better, use parameters.  For a complete list of reserved words in Access, see this:


Starting with ASP.NET 2.0? Look at:
Programming Microsoft Web Forms
My Blog
8/26/2005 11:43:28 AM

Similar Artilces:

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Type.GetType does not work in VB.NET but works in C#. VB.NET gurus Please help
Friends,   I am an experienced C# programmer who is working on a VB.NET project now. I am writing different methods covering the following functionalities 1) Take a datareader as input and return an arraylist of class object2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object. The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially. The schema of class object matches with the input (datareader or xmlnode)In C# I used to do th...

I need help in VB.NET
Can someone explain me the objects: public , Private , Protected , Property , Get and set, and how I'm using them and when i'm using them. Thanks :]. you can find useful info from this link: http://www.vbtutor.net/vbtutor.html They didn't real explaint how I am using it and for what... =\ Or I just didn't see it O.o help? These are not objects. public, private and protected are "protection levels", which can be assigned to a class, property or method. Property: A property is a controled way of retrieving and setting values of a class level variable. You u...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Linq defaulting to VB.net, need C#.net
Hi All, I have made my database mapping layer in Visual Studio and afterwards realized it wrote everything behind the scenes (in the dbml designer) in VB and not C#.  I tried creating a small dbml and selected C# as the language and it still created a VB designer.  This is the one thing I have left before I publish the ASP 3.5 version and the new mapping layer to production. Any idea's?  I couldn't find anything on the internet about this, Thanks in advance!!!Tim...

Need help with Jscript to VB.Net
I have some code that is converting from ASP to ASP.NET intPreg = new Number(intPreg); What would the VB.net code look like? Thx   I not very familiar with ASP, but my guess would be the following:     Dim intPreg As Integer Then, you can give it a value     intPreg = 9 Or, if you want to define a starting value, you can do the following:     Dim intPreg As Integer = 9 Alister...

I need help in vb.net #2
how can I link my result.vb to my this web form.vb ???Lynette use the  code behind property of the page tag to define the codebehind<%@ Page Language="vb" Codebehind="sampleCodeBehind.aspx.vb" %> Vikram www.vikramlakhotia.comPlease mark the answer if it helped you i mean let say i've one results.vb and another show.aspx (include show.aspx.vb)  what should I type in show.aspx.vb to link to results.vbLynette You mean results.vb is a class!if so you need to instantiate a object of that class. example belowDim r As New Results() r.METHOD() &nb...

Need help on VB 2003.Net
Question 1 Create an application that displays a letter grade based on the average of three test scores entered by Professor John. Each test is worth 100 points. Verify that the test scores entered by the professor are numeric. Use the following information to complete the application: Test Average Grade 90-100 A 80-89 B 70-79 C 60-69 D Below 60 F   I'm lost anyone can help please?  ...

vb.net vs c#.net vs j#.net
just out of curiousity which looks, acts most like java? i'm still learning trying to used to vb.net but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

need help converting C# to vb.net
need help converting C# to vb.net C# version is below ================================ namespace LicensedControls { [ LicenseProvider(typeof(ExpiringLicenseProvider)) ] public class ExpiringLicensedLabel : Label { public ExpiringLicensedLabel() { LicenseManager.Validate(typeof(ExpiringLicensedLabel)); } } } my attempt to get vb ========================= Namespace LicensedControls <LicenseProvider(GetType(ExpiringLicenseProvider))> Public Class ExpiringLicensedLabel ...

I need help translating some C# to VB.net
Hi, I'm trying to translate: protected void DeleteSelectedRows_Click(object sender, EventArgs e) {    //Iterate through all the GridView’s Rows    foreach (GridViewRow row in GridView1.Rows)    {       //Get the first column from the row where the HtmlInputCheckBox is located       TableCell cell = row.Cells[0];         //Get the HtmlInputChecklBox control from the cells control collection       HtmlInputCheckBox checkBox = cell.Cont...

Help needed to write a vb.net Function
 Hi I am a dotnet newbee.... I am wanting to write a function which i can use to pass values from one page to another. Can anyone help me with this and also give me some clues as to where to put the function, is it in the default.aspx or on the results page?Basically I am wanting to use this function to pass values between user controls which are on one web page, the page is named "EditModule" and contains the following UserControls:BasicModuleInformation.ascxSupportModuleLeaders.ascxSupportModuleStudents.ascxSupportModuleLeaders & Students BOTH contain a User...

I need you help on this
- I'm a vb.net developer and i have a task which converts some PHP codes to vb.net but i'm not family with PHP, so please help me if you can, thank alots!!!Here is the codes:$db = new Database($config['server'], $config['user'], $config['pass'], $config['database'], $config['tablePrefix']);$db->connect();$criteria = ''; $sql="SELECT * FROM postcode WHERE ".$criteria;$result = $db->query($sql);$firstcode = $db->query_first($sql); if (strlen($firstcode[lat])>0 && strlen($firstcode[lon])>0) {  &nb...

Web resources about - I NEED HELP...about vb.net!!!! - asp.net.object-datasource

Welcome - Net Objectives Net Objectives - Scrum Agile Training & Agile Development - TDD, Agile Scrum ...
Deliver value to your customers faster. NetObjectives.com is the industry leader in agile scrum training, scrum methodology, lean agile training, ...

經濟通 ET Net- 港股財經基金投資- 免費即時股票報價 HK Free Real Time Stock Quote
Copyright 2012 ET Net Limited. http://www.etnet.com.hk ET Net Limited, HKEx Information Services Limited, its Holding Companies and/or any Subsidiaries ...

.NET Framework - Wikipedia, the free encyclopedia
This article is about the Microsoft technology. For the top-level domain , see .net . For other uses, see .NET . The .NET Framework (pronounced ...

NFL Games Cast a Wide Net on Turkey Day
The Black Friday-Cyber Monday weekend is the blockbuster sales period for marketers, not just as the holiday launching point, but also as a contributor ...

Broadcast Nets Carry Special Reports on Obama Newser
The broadcast networks broke into daytime programming to carry remarks by President Obama on the attacks in Paris and the continued threat to ...

Changing Net Metering Policies Being Studied In Over Half Of US States
Changes to solar net metering policies are being studied or have been enacted in more than half of the states in this nation, states the N.C. ...

Walton explains why one-win Nets were such a challenge for Warriors
... 58° Navigation Home Giants A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch Walton explains why one-win Nets ...

Amica Game Recap: Celtics defeat the Nets, 120-95
Skip to main content Comcast SportsNet - CSNNE.com Header links TV Listings Channel Finder Apps Follow Bar RSN login or register Login Search ...

Net neutrality could be one of 'several hundred' poison pills in budget fight
... if Republicans pushed them—and cause a government shutdown. One of those could very well be blocking funding for the FCC to implement net neutrality, ...

Showtime To Premiere ‘Dark Net’ Docuseries In January
Showtime has greenlighted Dark Net , an eight-part docuseries that explores the dark side of technology, to premiere Thursday, January 21 at ...

Resources last updated: 11/29/2015 2:51:21 PM