473,395 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

makes-no-sense DBNull Errors

Hi all,

I am re-posting this message with more information. We
have been getting an error (see error message) frequently
on this line.

ElseIf dsOrder.Tables("tblItem").Compute("Sum
(ItemQuantity)", "ItemQuantity > 0") > 99 Then

The ItemQuanity value can never be NULL since we use ISNULL
(ItemQuantity,0) to take away NULLs in the SQL Server
stored procedure.

What can cause this error?

Thanks, Anna
------- Error message -----

System.InvalidCastException: Operator is not valid for
type 'DBNull' and type 'Integer'. at
Microsoft.VisualBasic.CompilerServices.ObjectType. ThrowNoVa
lidOperator(Object obj1, Object obj2) at
Microsoft.VisualBasic.CompilerServices.ObjectType. ObjTst
(Object o1, Object o2, Boolean TextCompare) at
Checkout.Order_Confirm.Page_Load(Object sender, EventArgs
e) in
D:\wwwroot\SSO_dotnet\checkout\order_confirm.aspx. vb:line
173 at System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain()

-------
Jul 21 '05 #1
1 1459
do you have a situation..... where you possibably have an order.....
without any items in the database...... and your doing a join in the SP ?

"Anna Lin" <ll*******@yahoo.com> wrote in message
news:06****************************@phx.gbl...
Hi all,

I am re-posting this message with more information. We
have been getting an error (see error message) frequently
on this line.

ElseIf dsOrder.Tables("tblItem").Compute("Sum
(ItemQuantity)", "ItemQuantity > 0") > 99 Then

The ItemQuanity value can never be NULL since we use ISNULL
(ItemQuantity,0) to take away NULLs in the SQL Server
stored procedure.

What can cause this error?

Thanks, Anna
------- Error message -----

System.InvalidCastException: Operator is not valid for
type 'DBNull' and type 'Integer'. at
Microsoft.VisualBasic.CompilerServices.ObjectType. ThrowNoVa
lidOperator(Object obj1, Object obj2) at
Microsoft.VisualBasic.CompilerServices.ObjectType. ObjTst
(Object o1, Object o2, Boolean TextCompare) at
Checkout.Order_Confirm.Page_Load(Object sender, EventArgs
e) in
D:\wwwroot\SSO_dotnet\checkout\order_confirm.aspx. vb:line
173 at System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain()

-------

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

198
by: Michael N. Christoff | last post by:
Java, the software developed by Sun Microsystems in the mid-1990s as a universal operating system for Internet applications, gave NASA a low-cost and easy-to-use option for running Spirit, the...
0
by: Dimitri Tholen | last post by:
Hi all, For a project I m working on I am looking for a database with all current car-makes & models from post-WII till now. With all the car websites around I am sure this information should...
4
by: Frank Hoek | last post by:
Hi, I try to create the following: 2 buttons next to each other, on a webpage button 1 makes (onClick) text 1 appear just beneath the button button 2 makes (onClick) text 2 appear just...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
7
by: Geri Becker | last post by:
Hello, I use the code <td align="left" valign="top"><img src="pictures/5pixel-transparent.gif" width="700" height="1" alt="" border="0"> to force the width of a table. But now my Internet...
3
by: Bryan Capps | last post by:
I have a text box control on a form, the value of which is calculated (concatenated) from entries on a subform. Accordingly, I've set the control's locked property to true and the tab stop...
4
by: Dawn Minnis | last post by:
Hi When I compile my files I get the following: driver.c: In function `main': driver.c:49: warning: assignment makes integer from pointer without a cast driver.c:50: warning: assignment...
22
by: Jon Skeet [C# MVP] | last post by:
I'm looking to write a C# book fairly soon, and the publisher I've approached wants me to do a bit of market research to find out what people like and don't like in this kind of book. I've read...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.