Results 1 to 8 of 8
  1. #1
    Join Date
    May 2004
    Posts
    2

    Question Unanswered: single quote in database field....

    Hi All,
    I am creating array in ASP from field in database.

    like:

    arr_hm_name[i] = OraDynaset("HMName")


    I am filling array throu loop (1..recordcount)
    When there is single quote in name field. This line is giving error.
    Does anyone have faced such prolem. What's the solution...


    Thanks

  2. #2
    Join Date
    Apr 2004
    Posts
    50

  3. #3
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    From what I can see there is nothing obvious that would cause a problem. What is the actual error or perhaps the rest of the code that goes with the snippet you have given....

  4. #4
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    For one thing, array's in ASP don't use [brackets]. They use (parenthesis):

    arr_hm_name(i) = OraDynaset("HMName")
    That which does not kill me postpones the inevitable.

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    good spotting seppuku, I've been writing javascript too long it would appear.

  6. #6
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    I have a hard time keeping it straight myself.. going between ASP, JavaScript, Perl, and a host of other languages that handle them all differently, it requires quite a bit of mental discipline... I keep reference guides for them all... even though I know the languages, it those minute details that sometimes get me hung up the worst...
    That which does not kill me postpones the inevitable.

  7. #7
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Yeah, and arrays that start from 1 instead of zero and other stupid things like that...

    You know what would be cool.... a consortium or standards committee for programming languages....

  8. #8
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Quote Originally Posted by rokslide
    You know what would be cool.... a consortium or standards committee for programming languages....
    It's called binary

    This would be a binary encoded "Array":
    0100000101110010011100100110000101111001

    That which does not kill me postpones the inevitable.

Posting Permissions

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