[thelist] Friday Freebie

Warden, Matt mwarden at odyssey-design.com
Fri Nov 3 14:26:22 CST 2000


>   '*** Casting the right types. look ma, I'm in pictures!!
>   uid = CLng(oRS(0))
>   username=CStr(oRS(1))
>   email = CStr(oRS(2))
>   createdate=CDate(oRS(3))

would not this cause errors if the field is NULL? Could you do:

uid = oRS(0)
if not isNull(uid) then uid=clng(uid) else uid=-1

Now, uid is probably a primary key, but you get the idea. Can you do it this
way, or do you have to access the recordset twice:

if not isNull(oRS(0)) then uid=clng(oRS(0)) else uid=-1

--
mattwarden
mattwarden.com





More information about the thelist mailing list