Php/Odbc Help

lod

Newbie Spellweaver
Joined
Mar 15, 2004
Messages
6
Reaction score
0
Hey everyone, im having problems with a php code and odbc, its a script to show online players from a data source on user dsn, im not getting to the db, dont really know why, heres the 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 ****\online.php on line 4", i add the data source called T4C Server to user dsn, can anyone help me pls? :P Ty

The code:

PHP:
<?php
//liste des membres en ligne
  //connection au serveur
  $cnx = odbc_connect( "T4C Server", "root", "" ) or die ("Impossible de se connecter
 
Yup, i tested, and its not that hard to config, its s simple thing to do, but dont know why im not getting to the db, i was hoping that was something wrong with the code =/
 
http://nl2.php.net/manual/en/function.odbc-connect.php

Everything seems to be alright, if at least your root user has indeed no password. It seems it can't find the T4C Server for some reason though.. Try making a new ODBC connection with a different name, preferably one without spaces and numbers (something like "test").

Don't see what else could be wrong here...
 
Back