Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange character in string
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00568674
Message ID:
00568698
Views:
16
>In one particular case, I am getting an address string that has a strange character at the beginning of it that I get an error on when I try to insert into a DB2 table.
>It looks like a staight line up and down right before my string.
>When I ran a query on the particular record in VB, and try to display it in a grid, it does not display anything.
>When I had someone run the query through the mainframe software, it shows the first character as a right bracket.
>I tried doing a replace on a right bracket in my code before the insert, but it does not remove it. any ideas?
>thanks,
>Ryan Uhl

It might be a special character from another codepage/language. These are usually saved as unicode on the DB, and in VB you can get the code using the StrConv() function. In any case depending on the client's windows settings it might not be displayed correctly so you might as well remove it for the purposes of displaying.

It could also be an ASCII non-printable character (Chr() <32 ) which would indicate a data-entry mishap that would need removing even from the DB. You might want to get its Asc(char) value and its StrConv(char,vbFromUnicode) value to see what you are dealing with and then make a decision if it needs to stay or go. HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform