www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  ODBC    connect to ODBC
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
This is kind off topic how to connect to ODBC.

<?php 
$server = "real_dsn_server:3180"; 
$user = "USERNAME REMOVED"; 
$password = "PASSWORD REMOVED"; 
$dbnameID="info"; 

?> 

 <?php 
    $conn=odbc_connect($server, $user, $password); 
    $sql="SELECT * FROM $dbnameID"; 
    $result=odbc_exec($conn,$sql); 
    echo "SUCCESS"; 
?>  


I got the following error:
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in odbc_log.php on line 10 

Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in odbc_log.php on line 12 
SUCCESS 


Why is that? Even though I can DSN in control Panel>ODBC on windows XP Pro and it said successfully.
 
Posts: 1 | Registered: Mon March 20 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  ODBC    connect to ODBC