How to insert Arabic characters in MS SQL Server 2005?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • farukcse
    New Member
    • Nov 2007
    • 52

    #1

    How to insert Arabic characters in MS SQL Server 2005?

    Dear ,

    i am trying to use php with MS SQL 2005.
    while i am trying connect using follwing code and inserting arabic data using quey then it stores the arabice data in database as garbase. can any one suggest me abt this problem?

    i solved this proble by using mysql_query("SE T NAMES utf8"); is there any similar anything in MS SQL server?
    [code]

    $myServer = "10.0.120.5 8";
    $myUser = "sa";
    $myPass = "123456";
    $myDB = "POSSQL";

    //connection to the database
    $dbhandle = mssql_connect($ myServer, $myUser, $myPass)
    or die("Couldn't connect to SQL Server on $myServer");

    $dbSelect = mssql_select_db ("$myDB")or die("Cannot select DB");



    if(!$dbhandle)
    {
    echo "Not connectd to MSSQL DB";
    }
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Start from here...

    Good Luck!!!

    ~~ CK

    Comment

    • farukcse
      New Member
      • Nov 2007
      • 52

      #3
      Dear,
      Thanx for your reply.
      but it doesnot support to fix this problem.
      for this same i used set names utf8 in mysql_query().
      so can you tell how to do this same functionaly for mssql?

      Your quick response is highly appriciated.

      Regards,
      Faruk

      Comment

      • farukcse
        New Member
        • Nov 2007
        • 52

        #4
        Dear,
        I may need to set its connection encoding upon connecting to the database in MSSQL.

        The equivalent of running SET NAMES utf8 under mysql after connecting.

        Regards,
        Faruk Chowdhury,

        Comment

        Working...