Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (not rsObject("columnNameThatDoesntExist") is nothing) then
- ' do some stuff
- end if
- ' else do nothin
- blnItWasntThere = True
- On Error Resume Next
- If (rsObject("columnNameThatDoesntExist") <> "") Then
- blnItWasntThere = False
- ...
- ...
- ...
- End If
- On Error Goto 0
- If blnItWasntThere Then
- 'handle this error'
- End If
- Function ColumnExists(objRS, Column)
- Dim blnOutput, x
- blnOutput = False
- On Error Resume Next
- x = objRS(Column)
- If err.Number <> 0 Then blnOutput = True
- On Error Goto 0
- ColumnExists = blnOutput
- End Function
- Dim oRs:Set oRs = Nothing
- On Error Resume Next
- Set oRs = rsObject("columnNameThatDoesntExist")
- On Error Goto 0
- If Not rsObject("columnNameThatDoesntExist" Is Nothing Then
- ' ...
- End If
Add Comment
Please, Sign In to add comment