I recently altered one of my datagrids I use and added a dropdownlist, a checkbox, and another simple textbox. I setup my sql table like I always do for checkboxes and what not. For some reason when you now edit a new row that's been added to the grid I get the following error:
Operator is not valid for type 'DBNull' and string "Service".
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.InvalidCastException: Operator is not valid for type 'DBNull' and string "Service".
Line 206: If AddingNew = False And Not (Val Is Nothing) Then
Line 207: Select Case Val
Line 208: Case "Service"
Line 209: Return 1
Line 210: Case "Parts"
How do I get it to recognize the empy/null sql field and move past it? The code its hanging up on is here:
Function dgDropDown1GetIDX(ByVal Val As Object) As Integer
If AddingNew = False And Not (Val Is Nothing) Then
Select Case Val
Case "New Sales"
Case "Used Sales"
Any ideas? I use this function to get the value that is already in the sql table.
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity)
There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …