罕用字 寫入oracle之問題
當我在下SQL指令時 : update chart set pt_name='曽玉雲' where chart_no=1 時會出現ORA-01576 之訊息.
此為'曽'為罕用字 oracle 在解析時出現問題,解決方法為,使用Command模式 (vb6.0)
-----------------------------------------------------------------------
dim Conn as new adodb.connection
dim cmd as new adodb.command
Conn.open ".............."
cmd.CommandText ="update chart set pt_name=? where chart_no=?"
cmd.CommandType = adCmdText
cmd.ActiveConnection = Conn
cmd.Parameters.Append .CreateParameter("pt_name", adVarChar, adParamInput, LenB(StrConv('曽玉雲', vbFromUnicode)), '曽玉雲')
cmd.Parameters.Append .CreateParameter("chart_no", adNumeric, adParamInput, LenB(StrConv('1', vbFromUnicode)), '1')
cmd.Execute
------------------------------------------------------------------------------