Results 1 to 5 of 5

Thread: Urgent: Weird characters in string(Resolved)

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    South Africa
    Posts
    47

    Urgent: Weird characters in string(Resolved)

    Hi

    I am doing a data conversion from AS400 to SQLSErver and using VB as the data manipulation tool. In some of the string fields I have charaters that looks like squares.

    I used the replace function to search and replace chr$(13) and chr$(10) characters, but was unsuccessful. These characters causes a syntax error in my SQL statement with error "Unclosed quotes"

    Does any one have an idea how to get rid or replce these characters? Obviously chr$(13) and chr$(10) is incorrect.

    Thnx
    Last edited by quasar_sa; Apr 15th, 2003 at 07:37 AM.

  2. #2
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463
    It is my experience that the square box character that appears can represent any number of characters and appears because the character cannot be natively identified from VB. Good luck in finding out !!

    Peeman.

    Best Bar.....

  3. #3
    Fanatic Member sridharavijay's Avatar
    Join Date
    Sep 2002
    Location
    http://www.vijaysridhara.in
    Posts
    589
    I donno if AS400 uses EBCDIC character code set.... then it should be better to convert them to Ascii before you send them to data base... , if you delete them you'll have a data loss.

    and for your question... for a sample character
    try
    Msgbox Asc(unresolved character) will give the ascii value of it... and you can map it to ascii characters then

    HTH

  4. #4
    Addicted Member
    Join Date
    Nov 2002
    Posts
    155
    Why not open the file in a hex editor and have a look at what those characters are?

    It's usually easy to tell Ascii from Ebcdic, by the way. One of the most common characters in normal data (as opposed to graphics, or encrypted stuff) is the 'space'. In Ascii that's hex 20, in Ebcdic it's hex 40. So if you see screeds of 20's or 40's in the hex side of the editor, that usually points you to Ascii or Ebcdic respectively.

  5. #5
    Addicted Member
    Join Date
    Nov 2002
    Posts
    155
    Oh btw, if you need a hexeditor, go to bpsoft

Posting Permissions

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



Click Here to Expand Forum to Full Width