SanDoty

Hi,

Please correct me if my understanding is wrong. VB.net is Unicode Compliant and i want to pass the values to my Database in DBCS format. How do i proceed

SanDoty



Re: Windows Forms General Convert DBCS to Unicode and Viceversa

nobugz

The database driver (Odbc, OleDb, Sql, etc) will take care of the conversion, no need to help.





Re: Windows Forms General Convert DBCS to Unicode and Viceversa

SanDoty

hi,

I have a middle tier which expects the input as DBCS.How do i convert Unicode to DBCS

SanDoty





Re: Windows Forms General Convert DBCS to Unicode and Viceversa

nobugz

Use Encoding.GetBytes() to convert the Unicode string to bytes. You'll need to obtain an Encoding instance with the System.Text.Encoding.GetEncoding(). Pass the code page number that matches the code page that the middle tier expects. You go the other way around with Encoding.GetString().