ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: SQL Server unicode strings
Date Tue, 22 Aug 2006 13:21:36 GMT
Can you execute that using a preparedstatement instead of statement?


On 8/22/06, Tarek Nabil <Tarek.Nabil@dubaiworld.ae> 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.
> **************************************************************************************************
View raw message