Then it should work like magic with iBATIS. Larry
On 8/22/06, Tarek Nabil <[EMAIL PROTECTED]> wrote:
Seems that with prepared statements, I don't need the prefix, it works anyway! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: Tuesday, August 22, 2006 5:22 PM To: user-java@ibatis.apache.org Subject: Re: SQL Server unicode strings Can you execute that using a preparedstatement instead of statement? Larry On 8/22/06, Tarek Nabil <[EMAIL PROTECTED]> wrote: > > > Hi, > > I have a case where I need to insert unicode data into a field in a > SQL server table. The field data type is nvarchar. > > I can very easily do this from the query analyzer using the "N" > prefix, which instructs SQL server to treat this data as unicode. It > even works with straight JDBC. For example, the following code works perfectly. > > stmt.executeUpdate("update t_temp_boe_invoice_details set > description = N'قيمة جديدة' where incomplete_bill_no = 1296"); > rs = stmt.executeQuery("select description from > t_temp_boe_invoice_details where incomplete_bill_no = 1296"); > > The actual code should be sending the value to a stored procedure instead. > Is there a way I can do this with iBatis rather than straight JDBC? > Please advise. > > Thanks > > N.B. If you see rubbish instead of the text between the single quotes, > it's because you don't have that specific encoding > installed.********************************************DISCLAIMER****** > ************************************** > This email and any files transmitted with it are confidential and > contain privileged or copyright information. If you are not the > intended recipient you must not copy, distribute or use this email or > the information contained in it for any purpose other than to notify > us of the receipt thereof. > If you have received this message in error, please notify the sender > immediately, and delete this email from your system. > > Please note that e-mails are susceptible to change.The sender shall > not be liable for the improper or incomplete transmission of the > information contained in this communication,nor for any delay in its > receipt or damage to your system.The sender does not guarantee that > this material is free from viruses or any other defects although due > care has been taken to minimise the risk. > ********************************************************************** > **************************** > > ********************************************DISCLAIMER******************************************** This email and any files transmitted with it are confidential and contain privileged or copyright information. If you are not the intended recipient you must not copy, distribute or use this email or the information contained in it for any purpose other than to notify us of the receipt thereof. If you have received this message in error, please notify the sender immediately, and delete this email from your system. Please note that e-mails are susceptible to change.The sender shall not be liable for the improper or incomplete transmission of the information contained in this communication,nor for any delay in its receipt or damage to your system.The sender does not guarantee that this material is free from viruses or any other defects although due care has been taken to minimise the risk. **************************************************************************************************