Note that there are some explanatory texts on larger screens.

plurals
  1. POConnect Codeigniter to ODBC that uses Windows Authentication
    text
    copied!<p>I am looking for a solution that will allow me to connect to MS SQL through an ODBC that uses Windows Authentication. I have tested and verified all of the rest of the code by using a standard ODBC connection that requires a user/pass. Below are the settings that work with that ODBC and the settings I have tried on the Windows Authentication ODBC.</p> <p>Working database.php settings -standard user/pass connection</p> <pre><code> $active_group = 'jf2'; $active_record = TRUE; $db['jf']['hostname'] = 'system DSN name'; $db['jf']['username'] = 'db_user'; $db['jf']['password'] = 'db_pass'; $db['jf']['database'] = 'db_name'; $db['jf']['dbdriver'] = 'odbc'; $db['jf']['dbprefix'] = ''; $db['jf']['pconnect'] = TRUE; $db['jf']['db_debug'] = TRUE; $db['jf']['cache_on'] = FALSE; $db['jf']['cachedir'] = ''; $db['jf']['char_set'] = 'utf8'; $db['jf']['dbcollat'] = 'utf8_general_ci'; $db['jf']['swap_pre'] = ''; $db['jf']['autoinit'] = TRUE; $db['jf']['stricton'] = FALSE; </code></pre> <p>non-working database.php settings - Windows Auth attempt</p> <pre><code> $active_group = 'jf1'; $active_record = TRUE; $db['jf1']['hostname'] = 'system DSN name'; $db['jf1']['username'] = ''; $db['jf1']['password'] = ''; $db['jf1']['database'] = 'db_name'; $db['jf1']['dbdriver'] = 'odbc'; $db['jf1']['dbprefix'] = ''; $db['jf1']['pconnect'] = TRUE; $db['jf1']['db_debug'] = TRUE; $db['jf1']['cache_on'] = FALSE; $db['jf1']['cachedir'] = ''; $db['jf1']['char_set'] = 'utf8'; $db['jf1']['dbcollat'] = 'utf8_general_ci'; $db['jf1']['swap_pre'] = ''; $db['jf1']['autoinit'] = TRUE; $db['jf1']['stricton'] = FALSE; </code></pre> <p>Specifically, I am unsure what will go into the user/pass fields. The error is below:</p> <blockquote> <p>A Database Error Occurred</p> <p>Unable to connect to your database server using the provided settings.</p> <p>Filename: C:\wamp\www\CodeIgniter_2.1.2\boss_table\system\database\DB_driver.php</p> <p>Line Number: 124</p> </blockquote> <p>Thanks for your help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload