Enter Keywords:
1 - 10 of 107(0.008 seconds)
Sort By:
 
I'm doing alot of stuff with databases. Currently I have to wrap half my query code with something that looks like this: MyString = Iif( IsDbNull( GetValueFromDatabase(myField) ), "", GetValu...
Zones: .NETDate Answered: 10/14/2003 Rating: 6.4 Views: 0
hi, i need to somehow determine if a Oledbcommands execute scalar method returns 0. the problem is as soon as it does, i get a "cast type from Dbnull to integer" error. thus i devised this plan...
Zones: MS Visual BasicDate Answered: 07/09/2004 Rating: 8.2 Views: 0
Good evening! I am getting error:System.InvalidCastException: Cast from type 'DBNull' to type 'String' is not valid, when database value is dbnull. When I  call a function: Protected Function rv...
Zones: MS Visual BasicDate Answered: 10/28/2004 Rating: 7.2 Views: 0
I am confused.  I have tried a number of things and I can get this to work.  The only thing that has worked is hard coding a DBNull.Value at the end of this sql parameter statement.  In this instan...
Zones: ASP.Net ProgrammingDate Answered: 03/11/2005 Rating: 8.4 Views: 0
If the database does have a null for this field it gives:  Cast from type 'DBNull' to type 'Boolean' is not valid. If the field isn't null it works ok.  Why is it flagging that boolean when it shou...
Zones: ASP.Net ProgrammingDate Answered: 05/17/2005 Rating: 8.6 Views: 0
In my newbie-ness, I assumed wrkArr3(n) = "" wrkColumn.DefaultValue = wrkArr3(n) would replace a DBNull from MS-SQL with a  ""   (blank string?)  during  wrkAdapter.Fill of myTable but t...
Zones: MS Visual BasicDate Answered: 03/12/2006 Rating: 9.6 Views: 0
I am working on optimizing an application which utilizes an access database. Just before the application finished processing I received and error message, Problem OccurredCast from type ‘DBNull’ to...
Zones: MS Visual BasicDate Answered: 03/30/2006 Rating: 9.4 Views: 0
Hi I need to check if a date stored in my db is null and if so then display some text. DateTime StoppedDate = Convert.ToDateTime((DateTime)row["StoppedDate"].ToString()); if(StoppedDate == DB...
Zones: C#Date Answered: 06/21/2006 Rating: 8.6 Views: 0
This works.  The try/catch seems to be needed for cases of DBNull.   I'm looking for a more efficient way to handle the DBNull case. Public Function TimeOnly(ByVal varTime As Object) As Strin...
Zones: ASP.Net ProgrammingDate Answered: 10/03/2006 Rating: 7.8 Views: 0
In a VB.net application using a SQLCE database we are using a SqlCeDataReader to "read" values from the DB. The values are then sent to a webservice. The problem occurs when we use an IF to chec...
Zones: Visual StudioDate Answered: 08/18/2007 Rating: 7.6 Views: 4