G
gv
Hi all,
I'm trying to exit out of the sub if there is nothing returned. But I'm
having problems evaluating
when nothing is returned. This part doesn't seam to work " If
rdr.IsDBNull(0) Then"
Dim SQLgetNewFiles As String = " Declare @Cnt int " & _
" set @Cnt = (Select count(*) from notes where
FileWasCreated is null) " & _
" If @Cnt <> 0 " & _
" BEGIN " & _
" Select hl7file from notes where FileWasCreated
is null " & _
" EXECUTE InsertIncrementnumber " & _
" End "
SQLNoteCmd = New SqlCommand(SQLgetNewFiles.ToString,
SQLNoteConn)
Dim NewFiles As String
Dim rdr As SqlDataReader = SQLNoteCmd.ExecuteReader()
While rdr.Read()
If rdr.IsDBNull(0) Then
Exit Sub ' Need to just Exit out
Else
NewFiles = NewFiles & rdr.GetString(0)
End If
End While
rdr.Close()
thanks
Gerry
I'm trying to exit out of the sub if there is nothing returned. But I'm
having problems evaluating
when nothing is returned. This part doesn't seam to work " If
rdr.IsDBNull(0) Then"
Dim SQLgetNewFiles As String = " Declare @Cnt int " & _
" set @Cnt = (Select count(*) from notes where
FileWasCreated is null) " & _
" If @Cnt <> 0 " & _
" BEGIN " & _
" Select hl7file from notes where FileWasCreated
is null " & _
" EXECUTE InsertIncrementnumber " & _
" End "
SQLNoteCmd = New SqlCommand(SQLgetNewFiles.ToString,
SQLNoteConn)
Dim NewFiles As String
Dim rdr As SqlDataReader = SQLNoteCmd.ExecuteReader()
While rdr.Read()
If rdr.IsDBNull(0) Then
Exit Sub ' Need to just Exit out
Else
NewFiles = NewFiles & rdr.GetString(0)
End If
End While
rdr.Close()
thanks
Gerry