[eluser]jadfreak[/eluser]
[quote author="North2Alaska" date="1252097374"]I'm setting up a new app that will connect to a MS Sql Server database. When I initialize the database.php file and run the welcome controller, I get the following error:
Code:
Fatal error: Call to undefined method CI_DB::CI_DB() in E:\wamp\www\ci\system\database\drivers\odbc\odbc_driver.php on line 53
I thought maybe ODBC wasn't setup correctly, but I can query the database with direct commands:
Code:
$conn=odbc_connect('Driver={SQL Server Native Client 10.0};Server=zrtpd0j6\Corp1;Database=Pricing;','myuser','thePass');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT 'HELLO WORLD' as msg";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table><tr><th>Message</th>";
while (odbc_fetch_row($rs))
{
$msg=odbc_result($rs,"msg");
echo "<tr><td>$msg</td></tr>";
}
odbc_close($conn);
echo "</table>";
My database.php looks like this:
Code:
$db['default']['hostname'] = "Driver={SQL Server Native Client 10.0};Server=zrtpd0j6\Corp1;";
$db['default']['username'] = "myUser";
$db['default']['password'] = "thePass";
$db['default']['database'] = "Pricing";
$db['default']['dbdriver'] = "odbc";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "";
$db['default']['dbcollat'] = "";
I am running on Windows XP with WAMP running locally. I am using the latest SVN version of CI, even though it says 1.7.1.
I've done a search of the forums but find nothing recent about this error. Any suggestions?[/quote]
im just confused..
in "Driver={SQL Server Native Client 10.0};Server=zrtpd0j6\Corp1;", what is
Corp1?