FAQ Database Discussion Community

VB Nullables and Nothings

I researched C#'s default keyword equivalence in VB.NET and came across this question. Then I got curious. Some background - I'm working with parsing an excel spreadsheet, where many columns can be null, and there is certainly a difference for me between an integer column being 0 and being null....

find if `find` method returns `nothing` in excel vba

I'm trying to find an id in a list and get it's address, but also deal with a situation if nothing is found. Here's what I have: Function find_in_two_ranges_two_sheets(ws1 As String, col1 As Integer) As Range Dim rows1 As Integer rows1 = Get_Rows_Generic(ws1, 1) Dim range1 As Range ' range...

Return DataTable from ORACLE

I'm trying to get data from Oracle to a Datatable. My idea was to create a function to do all connection staff and then call it from other parts of the code. Like: dt = New DataTable dt = Oracle2table(sql.ToString) Then, I created the function: Function Oracle2table(ByVal sql As String)...