Problem in transferring japanese data from oracle to SQL server


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Problem in transferring japanese data from oracle to SQL server

  1. #1
    Join Date
    Jul 2005
    Posts
    9

    Exclamation Problem in transferring japanese data from oracle to SQL server

    Hi,

    I am facing problem in transferring Japanese data from oracle 9i server to Ms-Sql Server.

    The Japanese characters in SQL server are not properly displayed in the Sql server table.
    For each Japanese character a '?' is substituted in the table (I think that the problem is with unicode data or language support).
    I am using DSN and adodc control for connecting to the databases.
    The code is like:

    '-----------------------------------------------------------------------

    Dim con As New ADODB.Connection

    Private Sub Command1_Click()
    con.Execute "insert into test values('" + Adodc1.Recordset.Fields("CONTENT1_TEXT") + "')"
    MsgBox "Copied"
    End Sub

    '----------------------------------------------------------------------
    Private Sub Form_Load()
    con.Open Adodc2.ConnectionString
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    con.Close
    End Sub

    '------------------------------------------------------------------------

    Please tell me how can i insert the correct Japanese data in the SQL server. Do I need to do anything with the SQL DB?

    Regards

    Gyanendra Mani Dwivedi
    e-mail gm_dwivedi@sify.com

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    It definitely sounds like a unicode problem. Assuming that everything is OK on the Oracle side what is the data type of the column where you are storing data in SQL Server? It should be NCHAR, NVARCHAR or NTEXT.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Jul 2005
    Posts
    9

    Exclamation Japanese data problem- I have to use data type 'varchar' only..........

    Hi Paul,
    Thanks for reply.
    But I have to use the data type 'varchar' only in SQL server Database with SQL_Latin1_General_CP1_CI_AS Collation. Further, The data is to be used by other utility. Is there anything (API/Unicode support) in visual basic? Why the japanese data is being converted as '???...' in SQL server Database?

    Regards

    Gyanendra Mani Dwivedi
    e-mail gm_dwivedi@sify.com

  4. #4
    Join Date
    Dec 2003
    Posts
    2,750
    AFAIK, in SQL Server you need to use the unicode supported counterpart to varchar which is nvarchar.

    http://msdn.microsoft.com/library/de...es_04_6zp0.asp
    Last edited by pclement; 07-25-2005 at 08:14 AM.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. Differences between Oracle And SQL Server
    By Shridhar Iyer in forum Database
    Replies: 1
    Last Post: 03-15-2002, 12:51 AM
  2. SQL Server Memory Problem I think?
    By Warren Dyer in forum Database
    Replies: 0
    Last Post: 03-05-2002, 01:54 PM
  3. Access & SQL Server
    By David Jones in forum Database
    Replies: 0
    Last Post: 08-31-2001, 12:22 PM
  4. Replies: 1
    Last Post: 12-31-2000, 01:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center