string argument error - new in 7.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • eric_darling
    Indigo Rose Customer
    • Jun 2002
    • 1801

    string argument error - new in 7.0

    This code worked in 6.0:
    Code:
    Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\My Program", "Last Checked", JulianDate, REG_SZ);
    Now in 7.0, I get the attached error whenever it runs.

    My question: I am using a JulianDate variable in the code, as you can see in my code snip. This was initialized in Project Actions -> On Startup.
    Code:
    JulianDate = System.GetDate(DATE_FMT_JULIAN);
    However, it doesn't seem to be stored as it was in the 6.0 version of this project. Is there something that changed in 7.0 in regards to life expectancy of variables?

    I figure I can probably work around it by simply re-initializing the variable, but I hate to think what else I might need to re-initialize. I tend to re-use variables an awful lot.
    Maybe there's something different about the returned value table of System.GetDate?
    Attached Files
    Last edited by eric_darling; 12-17-2007, 05:06 PM.
    Eric Darling
    eThree Media
    http://www.ethreemedia.com
  • eric_darling
    Indigo Rose Customer
    • Jun 2002
    • 1801

    #2
    Update: The workaround did, in fact, work. So, is this a bug in 7.0 or an unintended feature in 6.0 that has now been removed?
    Eric Darling
    eThree Media
    http://www.ethreemedia.com

    Comment

    • eric_darling
      Indigo Rose Customer
      • Jun 2002
      • 1801

      #3
      [bump]
      OK, has anyone else experienced early termination of stored variables in AMS 7, or is it just me?
      Eric Darling
      eThree Media
      http://www.ethreemedia.com

      Comment

      • Darryl
        Indigo Rose Staff Member
        • Jul 2001
        • 1908

        #4
        Hi Eric,

        I tried to simulate the problem by creating something similar as far as the variable goes in a version 6.0 project, then opening it in version 7.0, but haven't experienced the same result.

        As Eric says, has anyone else experienced this type of thing?

        Eric, you may want to send your project to our support department to look further into it and try to replicate it on our side.

        Comment

        • Bags
          Forum Member
          • Mar 2006
          • 61

          #5
          Try converting the variable to a string to see what it contains at that point. It may help you find where the problems stems from?

          Code:
          Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\My Program", "Last Checked", tostring(JulianDate), REG_SZ);

          Comment

          Working...
          X