1 Reply Latest reply on Sep 15, 2003 6:53 PM by 58568

    Are all SetFieldValues( ) the same?

    403468
      I'm trying to write some code that would be greatly simplified if I could say, as an example:

      SetFieldValue("MyField", "123")

      ... regardless of the actual type of "MyField".

      Here's what I mean. Obviously, the above code works just fine if "MyField" is a VARCHAR2 column. However, it also seems to work if "MyField" is a NUMBER. My question is, do the various overloads of SetFieldValue() all essentially call the same OCI call somewhere in the bowels of OO4O? If so, then it would seem to be safe to store everything in string format, right? (That way, I wouldn't have to know a column's type to be able to update it.)

      Thanks.

        • 1. Re: Are all SetFieldValues( ) the same?
          58568
          Hi,
          It may go through as you mentioned but as stated in the doc, you are advised to:
          "The SetFieldValue methods can fail under several conditions:
          ...
          if the type of the data being set cannot be coerced into the type needed by the database (for example trying to put "a boring string" into a number)."

          thanks,
          Ashish