connectivity

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
JasonTC
Forum Commoner
Posts: 92
Joined: Wed Nov 02, 2005 11:05 am
Location: Grand Rapids, MI

connectivity

Post by JasonTC »

Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


Any idea what might be wrong here?

Code: Select all

<?php
	$dbConnection = NULL;
	$dbName = 'webd';
	$dbUser = NULL;
	$dbPassword = '-------';
	
	if (!($dbConnection = @ odbc_connect($dbName, $dbUser, $dbPassword))) {
		echo('Could not connect to the database.');
	}
	
?>
I added the database in my ODBC settings in the Control Panel. I know the password's right. Any ideas?

Thanks,
Jason


Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

using odbc_error() will give you some useful info
Post Reply