Welcome Guest, Not a member yet? Register   Sign In
HELP: db-connection settings for ODBC to MSSQL
#1

[eluser]zyddee[/eluser]
Hello !

Im trying to setting up an database-connection for an computer on the internet with an mssql-database.
For some unknown reason I cant reach it with ipadress:port so Ive decided to make an odbc connection and use it to connect.
Ive searched the wiki and forum for an solution on how to use CI to connect to odbc. but havnt found anything usefull, hum.

It would be great if the connection source-code could be similar as possible to this code I use here below:
Code:
// DB Config --------------
        $config['hostname'] = $data['adress'];
        $config['username'] = $data['username'];
        $config['password'] = $data['password'];
        $config['database'] = $data['db'];
        $config['dbdriver'] = "mssql";
        $config['dbprefix'] = "";
        $config['pconnect'] = FALSE;
        $config['db_debug'] = TRUE;
        $config['active_r'] = TRUE;
        // ------------------------
            
        $conn = mssql_connect($data['adress'],$data['username'],$data['password']);
            
        if(is_resource($conn)){
            $DB_MSSQL = $this->load->database($config, TRUE);
        }
        else {
            return 'Kunde inte ansluta till databasen';
        }

So Is there any good solution for me out there?

// best regards


Messages In This Thread
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-01-2008, 02:05 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-01-2008, 04:02 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-01-2008, 04:19 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-10-2008, 05:39 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-10-2008, 10:47 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-10-2008, 11:58 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 02-11-2008, 12:15 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 05-12-2008, 07:11 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 05-29-2009, 01:17 AM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 03-24-2010, 12:30 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 03-25-2010, 06:45 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 09-26-2010, 11:30 PM
HELP: db-connection settings for ODBC to MSSQL - by El Forum - 03-08-2012, 03:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB