在gridview中读取nvarchar数据

时间:2012-02-17 05:45:38

标签: asp.net vb.net oracle gridview nvarchar

我正在使用此代码从Oracle数据库中读取数据。存储在Oracle中的数据是Navarchar2数据类型,但当它在gridview中显示时,它看起来像这样。

نصرت منوکÛ

HEre是我用来读取数据的代码 的更新

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim con = New OleDbConnection("Data Source=cms; User ID=cms20112012; Password=ramzan; provider=OraOLEDB.Oracle")
        con.open()
        Dim cmd As New OleDbCommand("Select * from V_GROW", con)
        Dim da As New OleDbDataAdapter(cmd)
        Dim ds As New DataSet
        Dim I As Long
        da.Fill(ds, "V_GROW")
        GridView1.DataSource = ds
        GridView1.DataBind()
        For I = 0 To ds.Tables("V_GROW").Rows.Count - 1
            Dim grower As String = ds.Tables("V_GROW").Rows(I).Item("Grower Name")
grower = Encoding.ASCII.GetString(Encoding.Unicode.GetBytes(grower))
            Label1.Text = grower
        Next I
        con.close()
    End Sub

请有人告诉我如何以实际的阿拉伯语形式显示我存储在数据库中的数据。

更新

这是我的查看查询,现在我的数据是这种形式的?& ? ?????? ??? ·R

select ZONE_NO "Zone No",to_char(GROWER_NAME_U) "Grower Name",to_char(FATHER_NAME_U) "Father Name" from CMS_GROWER
where rownum<11
and grower_name_u is not null

0 个答案:

没有答案