Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange character in string
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00568674
Message ID:
00568698
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform