By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,637 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,637 IT Pros & Developers. It's quick & easy.


P: n/a
Hello All,

I am using ODBC, connecting to an Oracle table that has a column of type

When I try to retrieve data into a string, I don't see it. I imagine its
because the null padding in the data.

Here is some simplified code to show my issue.

// Oracle Table
// ( EngColumn VARCHAR2(200),
// NLSColumn NVARCHAR2(400));

// EngColumn NLSColumn
// This is some text T h i s i s s o m e
t e x t
// Here is more text H e r e i s m o r e
t e x t

using System.Data;
using System.Data.Odbc;

private void InitializeData()
// MyConnection is an OdbcConnection control
OdbcConnection MyConnection = new OdbcConnection();
MyConnection.ConnectionString = = "DSN=" + HostName +
";UID=" + UserName + ";PWD=" + Password + ";";

string Query = "SELECT * FROM TableX";
OdbcDataAdapter daResults = new OdbcDataAdapter(Query, MyConnection);

DataTable dtResults = new DataTable();
DataGrid1.DataSource = dtResults;

private void DataGrid1_CurrentCellChanged(object sender, System.EventArgs e)

If I select a cell in the "EngColumn" I see the data. If I select a cell in
the NLSColumn, I get a blank string. I figure that it is something to do
with Unicode conversion, but I just can't seem to figure it out.

Feb 9 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.