Re: Recordset Data Type



Thanks for the input.

If I want to have a function to check for a database null from the
recordset, how do I pass the recordset value to the function?

I want to replace this code with a function:

If Not Isnull(My_Recordset("interest_rate")) Then
Interest_Rate = My_Recordset("interest_rate")
End If


To:

Interest_Rate = Get_Value(My_Recordset("interest_rate"))


There is no overload in VB6.
So, Get_Value must take and return a variant.
And, the code above will not work if the function return a string.
I need to change it to:

Interest_Rate = Cdbl(Get_Value(My_Recordset("interest_rate")))


Am I Correct? or it is not how it is done.







.



Relevant Pages

  • Re: String vs. Collection
    ... Our apps have to work againast multiple database types too, ... Depending on what database I am connecting, I load the corresponding SQLs to ... Now I know why concatanating a string is slow in VB6, ... think leavine the data in the recordset may be a better ...
    (microsoft.public.vb.enterprise)
  • Re: String vs. Collection
    ... Our apps have to work againast multiple database types too, ... Depending on what database I am connecting, I load the corresponding SQLs to ... Now I know why concatanating a string is slow in VB6, ... think leavine the data in the recordset may be a better ...
    (microsoft.public.vb.enterprise)
  • Re: String vs. Collection
    ... Depending on what database I am connecting, ... Now I know why concatanating a string is slow in VB6, ... think leavine the data in the recordset may be a better ...
    (microsoft.public.vb.enterprise)
  • Re: Recordset problem
    ... This is why I'm trying to use Recordset. ... Dim strPrice As String ... >> Dim dbs As Database ... >You don't need to open the database object dbs before ...
    (microsoft.public.access.modulesdaovba)
  • Re: String vs. Collection
    ... store database records, in fact why not leave them in the ... A string is ... I cannot keep the recordset open at all time. ... people accessing the database down there in the basement at any given time. ...
    (microsoft.public.vb.enterprise)

Loading