各位大侠好.    ADOQuery1->Close();
    ADOQuery1->SQL->Text = "select * from StudentInfo";
    ADOQuery1->Open();
 
    WideString StudentName;
    ADOQuery1->First();
    int cnt2=0;
    while( !ADOQuery1->Eof )
    {
        StudentName = ADOQuery1->FieldByName("StudentName")->???; // XXX
        ADOQuery1->Next();
    }我们公司给一个日本学校做mis系统,对方要求学生姓名字段使用Unicode.
请问应该如何获得这个在数据库中的Unicode字段.
注:数据库中表StudentInfo中字段StudentName是Unicode的.

解决方案 »

  1.   

    StudentName =WideString( ADOQuery1->FieldByName("StudentName")->Value);
      

  2.   

    昏,楼主咋发到Delphi版来了?偶哭哭……
      

  3.   

    因为我以前发在CBuilder板块很久都没有人解答,呵呵,好像dephi板块人气旺些.
    对了,我弱弱地问unsigned大哥一句:
    WideString( ADOQuery1->FieldByName("StudentName")->Value);你以前这样用过吗?
    我因为不在公司,也不好马上试
      

  4.   

    当然有用过呀,并且刚才帮人解决问题也是这样子解决滴。
    http://community.csdn.net/Expert/topic/4164/4164523.xml?temp=9.310549E-02