RSS Forums RSS
Please support our MS SQL advertiser: Programming Forums
Views: 1412 | Replies: 0
Join Date: Apr 2008
Posts: 1
Reputation: fijsolam1981 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
fijsolam1981 fijsolam1981 is offline Offline
Newbie Poster

Osql issue

  #1  
Apr 24th, 2008
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.
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:38 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC