fijsolam1981 0 Newbie Poster

Hi ,

I need your help please. I am using OSQL statement to execute SQL database script From CMD Line. Basically our application Support Other than English 5 Foreign languages, so each foreign language contains their on character set so its in Unicode format (* byte format). In the sql database script file which I am running is in UTF-8 format I saved. Even Though the contents of data base script file are saved in UTF-8 format when I Execute this script from Command Line Using OSQL command it is not created the data using insert in UTF-8 format instead it is adding + or – symbol where ever there is Unicode correspondent letter is required .

For Example
When I run the script using Sql Server Query Analyzer (SQL server 2005)

This is a value of a language table when I run the script from query analyzer of sql server 2005.Just showing only one entry.

Table name: LIST_VALUES_LANG
10V46   15MTU   Mes activités

When I run and create Database Using OSQL Command

This is a value of a language table when I run the script using OSQL command from command line.
Eg: (COMMAND LINE CODE)

OSQL -S 192.168.100.162 -U sa -P cc123!@# -i "D:\NGCC5.0Maintenance\NGCC 5.0 Installer\bin\Release\DBSCRIPTS\OneDesktop Admin\STD\CreateDataBase.sql"

Table name: LIST_VALUES_LANG
10V46   15MTU   Mes activit+s

Actually Using OSQL command is written inside a batch file. So running the batch file is able to create database, table, Sps, and I am able to insert vales also to this. Only for foreign language I am having this issue of Format. All the other things create database, Tables and insert values to tables and creating sps are doable with this. And for my project I need to execute this only through OSQL. Because I have dynamic requirements from client to do this from OSQL

Please help me. I am in a very difficult Situation. I tried all these things nothing works.

osql -U login_id [-e] [-E] [-p] [-n] [-d db_name] [-Q "query"] [-q "query"]
[-c cmd_end] [-h headers] [-w column_width] [-s col_separator]
[-t time_out] [-m error_level] [-I] [-L] [-?] [-r {0 | 1}]
[-H wksta_name] [-P password] [-R]
[-S server_name] [-i input_file] [-o output_file] [-u] [-a packet_size]
[-b] [-O] [-l time_out]

Note :
Since it is critical issue I am adding Sql Script and bath file here.

With Thanks
Fijo Francis T.