|
-
Apr 15th, 2003, 04:02 AM
#1
Thread Starter
Member
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.
-
Apr 15th, 2003, 04:24 AM
#2
Hyperactive Member
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.....
-
Apr 15th, 2003, 04:32 AM
#3
Fanatic Member
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
-
Apr 15th, 2003, 04:38 AM
#4
Addicted Member
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.
-
Apr 15th, 2003, 04:40 AM
#5
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|