Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2003
    Location
    Belarus
    Posts
    45

    SQLITE - escape sequences does not work

    SQLITE - escape sequences does not work.
    I have database (made from example in sqlite plugin). I saved there string like "\t123123123\n\t567567567".
    Then from example:

    sRule = tRules.Data[nItemRowNumber]["Rule"];
    Input.SetText("Input_Info_Display", sRule);

    And on the screen I can see:

    \t123123123\n\t567567567

    Why escape sequences does not work?

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    Because the string from the database doesn't contain the ASCII value for a tab, it contains the charecter values of "\" and "t". Therefore the script interpreter also sees it that way.

  3. #3
    Join Date
    May 2003
    Location
    Belarus
    Posts
    45

    So, Can you help me??

    So, can you help me to solve the problem??
    Anyway thx for answer.

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Code:
    function Reformat(sSourceString)
    	sSourceString = String.Replace(sSourceString, "\\t", "\t", false);
    	sSourceString = String.Replace(sSourceString, "\\n", "\n", false);
    	sSourceString = String.Replace(sSourceString, "\\r", "\r", false);
    	return sSourceString;
    end
    
    
    sRule = tRules.Data[nItemRowNumber]["Rule"];
    sRule = Reformat(sRule);
    Input.SetText("Input_Info_Display", sRule);

  5. #5
    Join Date
    May 2003
    Location
    Belarus
    Posts
    45

    Thnx

    Worm - Big Thanx to you.
    I will try to do it, but "You, Worm - are my friend".

    Thnx again

  6. #6
    Join Date
    Oct 2003
    Posts
    164
    Worm!

    On behalf of the AMS community, please accept this little note of thanks for sharing all the insights re: SQLite stuff, particularly the tips on using escape sequences and variables with queries, et. al. Personally, I'm knee deep in my first real AMS SQLite project, and your posts on these issues have made all the difference.

    So, please accept this "100 pound Virtual Fruitcake" as a small token of our collective gratitude.



    Like the Hallmark Card Company always says... "It's the thought that counts". While it may not fill your belly, hopefully it will bring a smile to your face.
    -Scott F.

  7. #7
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    mmmmmmmmmmmmmmmmm, FruitCake!

    Thank you for the kind words. I appreciate them. (and the FruitCake, can't forget the fruitcake?).

    And yes, I'm smiling

  8. #8
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    That is the best type of fruitcake . . . virtual.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. SQLite Command Question (DELETE ROW)...
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 15
    Last Post: 12-08-2006, 11:17 AM
  2. SQLite data to HTML file
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 16
    Last Post: 10-23-2004, 03:19 AM
  3. Spotlight: SQLite Actions Plugin
    By Desmond in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 03-12-2004, 09:11 AM
  4. Using Escape Sequences
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 11-05-2003, 03:29 PM

Posting Permissions

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