Hello
I have a problem to get a DBNULL from database.
I need somthing similar to
"If Not IsDBNull(reader.Item("ID".ToString)) Then sID = reader.Item("ID".ToString)"
which is from VB Net, the query Works fine, also in V4A with joins
In V4A i have
Thanks in advanced
Uli DataProtec
I have a problem to get a DBNULL from database.
I need somthing similar to
"If Not IsDBNull(reader.Item("ID".ToString)) Then sID = reader.Item("ID".ToString)"
which is from VB Net, the query Works fine, also in V4A with joins
In V4A i have
B4X:
sSQL = "SELECT p.ID, p.UserID, p.RegisterType_ID, p.CheckIn, p.CheckOut,"
sSQL = sSQL & " f.UserID, f.Name, f.Password"
sSQL = sSQL & " FROM CheckInOut_Table p"
sSQL = sSQL & " INNER JOIN UserInfo_Table f"
sSQL = sSQL & " ON p.UserID = f.UserID"
sSQL = sSQL & " Where f.UserID = '" & aktUserID & "'"
sSQL = sSQL & " And f.Password = '" & sPassword & "'"
sSQL = sSQL & " Order By CheckIn DESC"
Dim rs As JdbcResultSet = msSQL.ExecQuery(sSQL)
Do While rs.NextRow
Log(rs.GetString2(0))
Log(rs.GetString2(1))
Log(rs.GetString2(2))
Log(rs.GetString2(3))
Log(rs.GetString2(4)) '*** sometimes need to have DBNULL, this i need to know
'*** In this way is DBNULL = True the App exit with Error Msg
'** java.lang.NullPointerException: Attempt to invoke virtual method 'int
'***java.lang.String.length()' on a null object reference
Loop
Thanks in advanced
Uli DataProtec