Announcement

Collapse
No announcement yet.

Weird error using string tables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weird error using string tables

    I have a weird error, when I get a string table entry it works fine.
    When I try to something like this...
    Code:
    MSGBOX GetStringTable(%someid) & "some other data"
    It only shows the string table entry, not the concatenated string.
    Anyone ever see this before?

    Code:
    'The GetStringTable function I use...
    FUNCTION GetStringTable( lngStringID AS LONG ) AS STRING
    	LOCAL strBuffer AS STRING
    	strBuffer = STRING$( 1024, 0 )
    	LoadString ghInst, lngStringID, BYVAL STRPTR( strBuffer ), LEN( strBuffer )
    	FUNCTION = strBuffer
    END FUNCTION

    ------------------
    George W. Bleck
    Senior System Engineer
    KeySpan Corporation
    <b>George W. Bleck</b>
    <img src='http://www.blecktech.com/myemail.gif'>

  • #2
    George,

    I just had a glance over your code and it looks like you have a null character returned from the string table (chr$(0))

    Null characters will 'cut off' strings when used in windows (ie. MsgBox)

    - Try adding "Remove$(var, chr$(0))" etc.

    HTH

    ------------------
    Kev G Peel
    KGP Software, Bridgwater, UK.
    mailto:[email protected][email protected]</A>

    [This message has been edited by Kev Peel (edited August 31, 2001).]
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Thanks Kev...that was the answer.



      ------------------
      George W. Bleck
      Senior System Engineer
      KeySpan Corporation
      <b>George W. Bleck</b>
      <img src='http://www.blecktech.com/myemail.gif'>

      Comment

      Working...
      X