• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

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
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
You sure you added the correct system DNS to your SQL server? And with correct I mean tested it thoroughly ;)
 

lod

Newbie Spellweaver
Joined
Mar 15, 2004
Messages
6
Reaction score
0
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 =/
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20


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
Top