Alpha Video Training
Results 1 to 3 of 3

Thread: stritran() question

  1. #1
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,756

    Default stritran() question

    I must be missing something painfully obvious ....

    I'm returning a numeric value that I'm trying to insert into a string using stritran(). I can't make it work!

    Ashampoo_Snap_Wednesday, December 13, 2017_14h10m34s_016_.png

    Ashampoo_Snap_Wednesday, December 13, 2017_14h12m02s_017_.png
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  2. #2
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,563

    Default Re: stritran() question

    Since you are changing the variable type from numeric to character, you should use a second character variable

    dim _pidC as C
    dim _pid as n

    _pid = 0 ' not needed...

    _pid=p.rs.data("id") ' ARE YOU SURE THIS IS A NUMERIC VALUE?

    MYTYPE=TYPEOF(_PID) ' will indicate the variable type

    _pidC = convert_type(_pid,"C")

    js=stritran(js,"__DATA__",_pidC)
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,756

    Default Re: stritran() question

    eeeek! That did it! Using a second var did the trick.

    Thanks Al!
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

Similar Threads

  1. stritran() -- What am I missing here??
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 11-30-2016, 02:33 PM
  2. stritran in dbf memo field
    By christappan in forum Alpha Five Version 10 - Desktop Applications
    Replies: 1
    Last Post: 10-28-2010, 12:54 AM
  3. Stritran() vs. Strtran(), What's the difference?
    By Fulltimer in forum Application Server Version 8
    Replies: 2
    Last Post: 12-12-2007, 10:27 AM
  4. stritran help
    By djldc in forum Alpha Five Version 8
    Replies: 43
    Last Post: 11-10-2007, 11:49 AM
  5. How do you use the STRITRAN function?
    By Stephen F Zaborsky in forum Alpha Five Version 5
    Replies: 2
    Last Post: 11-12-2004, 05:26 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
  •