Urgent !!JApanese char insertion into SQLServ 
Author Message
 Urgent !!JApanese char insertion into SQLServ

Hi All,
I've a problem in inserting japanese data from a word 2k document into
SQLServer 2000.I've written a VB program which uses Word Object Library to
get the data into vb program and insert into SQLServ.
The program is inserting '????' in place of japanese characters could u pls
let me know whats wrong with the code.
the code is something like this

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
'cn.Open "Driver={SQL
'cn.Open "sqldsn", "sa", "xxx"

'cn.CursorLocation = adUseClient
rs.Open "select * from jptab", cn, adOpenForwardOnly, adLockReadOnly
Set doc = app.Documents.Open("c:\sri\jpmodules\jp.doc")
doc.Windows.Item(1).WindowState = wdWindowStateMinimize
rcount = doc.Tables(1).Rows.Count
ccount = doc.Tables(1).Columns.Count
For r = 0 To rcount - 1
  For c = 0 To ccount - 1

     'Dim MyByteString(0 To 4) As Byte
     'Get #1, , MyByteString

  tst = doc.Tables(1).Cell(r + 1, c + 1).Range.Text
  'tst = Left(tst, Len(tst) - 1)
  cn.Execute "Insert into jptab values ('" & tst & "',null)"
  Next c
Next r


Sun, 12 Oct 2003 12:53:52 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Can't include japanese char in VB text-box

2. japanese chars in textbox in VB ? help

3. URGENT : Japanese VB v4.0 Needed

4. Problems with Japanese strings and binary files in a Japanese environment

5. Problems with Japanese strings and binary files in a Japanese environment

6. Generic insertion combo box (was :Insert text at Insertion point of a field)

7. RTF insertion of text at a specific insertion point

8. searching Char-Counter URGENT!!

9. CRW7.0 + SQLServ OLEB permissions?

10. ASCII Chars -> large chars

11. char after each 2 chars in a string.

12. Reading a text file char by char.


Powered by phpBB® Forum Software