Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Japanese char couldn't display properly after update


Message #1 by "Brian Zeng" <levin001@h...> on Mon, 25 Feb 2002 01:23:21
Hi, 

I am implementing a multilingual system with MS SQL Server7. I defined the 

field as nvarchar. In the asp code, it works perfect well when you try to 

add data, but it failed to display japanese char if you try to update.



The asp code for adding a new entry is

---------------------------------------------------

Set details = Server.CreateObject("ADODB.Recordset")

details.Open "jobdetails", strConnect, adOpenStatic, adLockOptimistic, 

adCmdTable





details.AddNew   

details("srfNo") = currentsrfNo

details("job") = request.form("task1")

details("Report") = request.form("report1")

details("TechNotes") = request.form("tech1")

details("jobstatus") = request.form("jobstatus1")

details.Update		



----------------------------------------------------





the asp code for update is

----------------------------------------------------

additionalRec = request.form("add")

strUpdate = "update srf set AdditionalRec ='" & additionalRec &"' where   

             srfNo=" & currentSRFNo

objCmd.commandtext=strUpdate	

objCmd.Execute



----------------------------------------------------





There is no issue by using the above code for English input, but the 

update doesn't work for japanese input update. (it display "????" instead 

of proper japanese char. Even the user didn't change the contents of the 

field)



I am just wondering  why it works well with adding japanese input but not 

update.







Please advise.



thanks in advance



Brian

  Return to Index