I have a WSH vbscript that reads one SQLServer table and writes to another. Just one nvarchar column per table. Some of the 'from' data is in Chinese and a wscript.echo shows the Chinese values fine. However, when I write to the second table Chinese characters come out as '???????'.
This is, essentially, the code:
Any ideas gratefully accepted
This is, essentially, the code:
Code:
set impConn = Wscript.CreateObject("ADODB.Connection")
call impConn.Open("Provider=SQLOLEDB;charset=utf8;Data Source=S1;database=SQLS;User ID=a;Password=b")
set impRS = Wscript.CreateObject("ADODB.RecordSet")
call impRS.Open("select * from T1", impConn)
while not impRS.eof
wscript.echo(impRS("title"))
impConn.execute("insert into T2 (title) values('" & impRS("title") & "')")
call impRS.MoveNext()
wend
call impRS.Close()
Any ideas gratefully accepted