Welcome Guest, Not a member yet? Register   Sign In
An error occurred translating the query string to UTF-16: No mapping for the Unicode
#1

(This post was last modified: 02-08-2015, 06:59 PM by projack89.)

Hi All,
I have a problem when using CI 2.14 or 2.1.0 with SQL Server 2012. I use sqlsrv for dbdriver. I got error massage like this when try to Login in my application. This error was happened when i was tried to input my password form with number, symbols and another else except character.If I only input password form with character everthing still working good. I have used google for solved my problem and only got this tutorial but I still got error when I tried 

http://stackoverflow.com/questions/91787...odeigniter

Code:
A Database Error Occurred
Error Number: IMSSP
An error occurred translating the query string to UTF-16: No mapping for the Unicode character exists in the target multi-byte code page. .
SELECT * FROM tbl_mst_user WHERE USER_ID = 'opsup4' AND USER_PASSWORD = '���hbhb'
Filename: C:\xampp\htdocs\kerjaan\TreasuryOperation\system\database\DB_driver.php
Line Number: 330


This is my Model when insert to database

PHP Code:
public function validate(){
        
$USER_ID $this->security->xss_clean($this->input->post('USER_ID'));
 
       $USER_PASSWORD $this->security->xss_clean($this->input->post('USER_PASSWORD'));
 
       $EnkripsiUserPassword=Enkripsi($USER_PASSWORD);
        
$this->dbuser->where('USER_ID'$USER_ID);
 
       $this->dbuser->where('USER_PASSWORD'$EnkripsiUserPassword);
 
       // Run the query
 
       $query $this->dbuser->get('tbl_mst_user');
 
       if($query->num_rows == 1)
 
       {
 
           // If there is a user, then create session data
 
           $row $query->row();
 
           $data = array(
 
                   'USER_IDX' => $row->USER_IDX,
 
                   'USER_ID' => $row->USER_ID,
 
                   'USER_NAME' => $row->USER_NAME,
 
                   'UNIT_ID' => $row->UNIT_ID,
 
                   'DEPARTMENT_ID' => $row->DEPARTMENT_ID,
 
                   'DIVISION_ID' => $row->DIVISION_ID,
 
                   'BRANCHBSMI_ID' => $row->BRANCHBSMI_ID,
 
                   'GROUP_NAME' => $row->GROUP_NAME,
 
                   'GROUP_DESCRIPTION' => $row->GROUP_DESCRIPTION,
 
                   'validated' => true
                    
);
 
           $this->session->set_userdata($data);
 
           return true;
 
       }
 
       // If the previous process did not validate
 
       // then return false.
 
       return false;
 
   

And this my file in Third Party folder for Encrypt and Decrpty User input password

PHP Code:
sory edited for any reason :


My question, is this a bug from CI driver for SQL Server ? And how to solved this problem, any advice to me ? This is make me painful

Thank you
Reply


Messages In This Thread
An error occurred translating the query string to UTF-16: No mapping for the Unicode - by projack89 - 02-08-2015, 07:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB