tags:

views:

23

answers:

1
<?php


$db_host = "IQRA";
$db_user = "iqra17";
$db_pass = "";

echo $db_host;
$sqlconnect=odbc_connect($db_host,$db_user,$db_pass);
$sqlquery="SELECT companyName FROM Customers;";
$process=odbc_exec($sqlconnect, $sqlquery);
    echo $process;

while(odbc_fetch_row($process)){
$companyName = odbc_result($process,"companyName");
echo "$companyName<br>"; }
odbc_close($sqlconnect);

?> 

When i run this script from phpSv which comes with Nusphere the data base iaccessed but when i run it on apache i get error: odbc_connect: SQL Error:[Microsoft][ODBC Driver Manager] Data Source Name not found and no default driver specified, SQL State IM002 in SQLConnect

Can anyone please explain to me whats going on.

Tnaks

A: 

It seems like you try to connect to a database that needs the ODBC driver and your apache doesn't have it.

ApoY2k
Does apache use a different ODBC driver then SQL Server(thats the ODBC Driver I have specified for database) if apache does require a different driver where do i getit from and how do i install it. Thanks
farkhunda