Alpha Video Training
Results 1 to 5 of 5

Thread: append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper characte

  1. #1
    Member
    Real Name
    Bill Standke
    Join Date
    Apr 2013
    Posts
    14

    Default append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper characte

    I'm trying to add a timestamp to a records I'm appending.

    This works
    tbl.DATELOADED = convert_type(time("",now()),"c")
    append.m_exp25 = convert_type(myProj_id,"c")

    but this doesn't
    append.m_exp24 = convert_type(time("",now()),"c")

    ???

  2. #2
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,873

    Default Re: append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper char

    bill,
    did you convert an append operation to xbasic? if so, then the the 2nd would be correct.

    there should be an append.m_field24 = "dateloaded"
    to match the append.m_exp24

  3. #3
    Member
    Real Name
    Bill Standke
    Join Date
    Apr 2013
    Posts
    14

    Default Re: append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper char

    Not sure I understand. I built an append operation and then took the xbasic generated from it and added it to some other xbasic code I have attached to a button. I'm trying to plugin a timestamp into the rows I'm appending and ended up with this. When it runs I get an error saying improper character.

    append.m_field24 = "Dateloaded"
    append.m_exp24 = convert_type(time("",now()),"c")

    4-8-2013 2-08-50 PM.jpg

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper char

    I believe the expression to be appended must be a character string which Alpha can evaluate.

    append.m_field24 = "Dateloaded"
    append.m_exp24 = "convert_type(time(\"\",now()),\"c\")"

    or

    append.m_exp24 = "time(\"\",now())"
    There can be only one.

  5. #5
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,873

    Default Re: append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper char

    ...as usual, Stan's right on the money!

    Explanation. The append.M_exp24 must be a Character type expression, therefore the "\" before the Quotes.
    Last edited by Tom Henkel; 04-08-2013 at 09:14 PM. Reason: a little explanation

Similar Threads

  1. "Object Is Not Defined" Error When I Use "Close Form" in the "OnInit"
    By nigeldude in forum Alpha Five Version 11 - Desktop Applications
    Replies: 5
    Last Post: 03-23-2013, 05:22 AM
  2. Error "Extra characters at end of expression" when LINK field is type "K"
    By RichCPT in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 10-29-2011, 01:11 AM
  3. error - "a5.js" and "'this._keys.length' is null or not an object"
    By eritovs in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-13-2011, 10:12 PM
  4. form.view("fName","","","center","center")
    By reynolditpi in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 07-15-2008, 12:37 AM
  5. "Add" and "Save" buttons don't stay on "Self" page
    By Scholin in forum Application Server Version 8
    Replies: 2
    Last Post: 02-05-2008, 08:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •