Click here to Skip to main content
15,891,677 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: insert images into cell Pin
Christian Graus26-Jul-09 21:51
protectorChristian Graus26-Jul-09 21:51 
QuestionDatabase to array Pin
Member 437454226-Jul-09 17:52
Member 437454226-Jul-09 17:52 
AnswerRe: Database to array Pin
Christian Graus26-Jul-09 20:09
protectorChristian Graus26-Jul-09 20:09 
GeneralRe: Database to array Pin
Member 437454227-Jul-09 0:25
Member 437454227-Jul-09 0:25 
GeneralRe: Database to array Pin
Henry Minute27-Jul-09 1:41
Henry Minute27-Jul-09 1:41 
Questionocx question Pin
weic_tsubusa26-Jul-09 17:12
weic_tsubusa26-Jul-09 17:12 
AnswerRe: ocx question Pin
Christian Graus26-Jul-09 20:10
protectorChristian Graus26-Jul-09 20:10 
QuestionDBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jacob Dixon26-Jul-09 10:18
Jacob Dixon26-Jul-09 10:18 
I cannot figure out why this doesn't work. Everythign says it should... I'm trying to see if a datagridviewrow contains DBNUll

'first = IIf(TypeOf _row.Cells(1).Value Is DBNull, 0, CDec(_row.Cells(1).Value))
'second = IIf(TypeOf _row.Cells(2).Value Is DBNull, 0, CDec(_row.Cells(2).Value))
'final = IIf(TypeOf _row.Cells(3).Value Is DBNull, 0, CDec(_row.Cells(3).Value))


I GET ERRORS!!!

But if I do this, not only is it ugly as heck but it works!!
If (TypeOf _row.Cells(1).Value Is DBNull) Then
    first = 0
Else
    first = _row.Cells(1).Value
End If

If (TypeOf _row.Cells(2).Value Is DBNull) Then
    second = 0
Else
    second = _row.Cells(2).Value
End If

If (TypeOf _row.Cells(3).Value Is DBNull) Then
    final = 0
Else
    final = _row.Cells(3).Value
End If




Why?!?! I'm so angry. I have tried everything from
IsDBNull(value)


to

value Is DbNull
value Is DbNull.Value


to

value is typeof(DbNull)



Its just frustating.. am I doing something wrong here or is this just a flaw?
AnswerRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Mycroft Holmes26-Jul-09 12:24
professionalMycroft Holmes26-Jul-09 12:24 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jacob Dixon26-Jul-09 14:51
Jacob Dixon26-Jul-09 14:51 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Mycroft Holmes26-Jul-09 14:59
professionalMycroft Holmes26-Jul-09 14:59 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jacob Dixon26-Jul-09 15:04
Jacob Dixon26-Jul-09 15:04 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
nlarson1126-Jul-09 16:24
nlarson1126-Jul-09 16:24 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jacob Dixon26-Jul-09 16:28
Jacob Dixon26-Jul-09 16:28 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
nlarson1126-Jul-09 16:35
nlarson1126-Jul-09 16:35 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jacob Dixon26-Jul-09 17:15
Jacob Dixon26-Jul-09 17:15 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
nlarson1127-Jul-09 3:03
nlarson1127-Jul-09 3:03 
GeneralRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jacob Dixon27-Jul-09 3:07
Jacob Dixon27-Jul-09 3:07 
AnswerRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Jack Vanderhorst27-Jul-09 4:37
Jack Vanderhorst27-Jul-09 4:37 
AnswerRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Dougie the P5-Aug-09 18:07
professionalDougie the P5-Aug-09 18:07 
Questionwhich is faster? Pin
TheMrProgrammer25-Jul-09 19:00
TheMrProgrammer25-Jul-09 19:00 
AnswerRe: which is faster? Pin
Luc Pattyn25-Jul-09 22:34
sitebuilderLuc Pattyn25-Jul-09 22:34 
GeneralRe: which is faster? Pin
TheMrProgrammer26-Jul-09 5:08
TheMrProgrammer26-Jul-09 5:08 
GeneralRe: which is faster? Pin
Luc Pattyn26-Jul-09 8:41
sitebuilderLuc Pattyn26-Jul-09 8:41 
GeneralRe: which is faster? Pin
TheMrProgrammer27-Jul-09 4:13
TheMrProgrammer27-Jul-09 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.