"ODBC" Error.

Problems with the Windows version of XAMPP, questions, comments, and anything related.

"ODBC" Error.

Postby DY357LX » 26. March 2010 02:36

Firstly, I apologize if this is the wrong place to be asking for help with XAMPP and PHP scripts. I wasn't sure where else to ask.

Basically I'm attempting to follow a series of video tutorials for making a basic community website.
( This one: http://www.developphp.com/view_tlesson.php?str=101xxphp_lessons )

I've created a test connection script (from this page) and it runs fine. (Says "CONNECTION SUCCESSFUL!")

But when I move to the next step (creating member tables using this page: http://www.developphp.com/view_tlesson.php?str=102xxphp_lessons)
I run into the following error:

Success in database file CONNECTION.....

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\Pete\scripts\create_Table.php on line 34
(I can paste in the code if required but it's also on the above page.)

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\Pete\scripts\create_Table.php on line 34
no TABLE created. You have problems in the system already, backtrack and debug!


I've tried created a new user in the XAMPP control panel (window title reads: "phpMyAdmin") and updating the .php files to reflect the new username and
password but this "ODBC" stuff still appears.

What are the odds that folder restrictions are causing problems? (I'm on Windows 7 and have just noticed that a lot of folders in the XAMPP directory are
listed as "Read Only".)

Thank you for your time, any help would be greatly appreciated.
Anyone know where the user (?) ODBC is coming from and how fix the error I'm receiving?
DY357LX
 
Posts: 1
Joined: 26. March 2010 02:24

Re: "ODBC" Error.

Postby Altrea » 26. March 2010 05:51

DY357LX wrote:Firstly, I apologize if this is the wrong place to be asking for help with XAMPP and PHP scripts. I wasn't sure where else to ask.

If you would have taken some seconds to read the several board describtions, you should have seen that there is an english part especially for english users. I should answer you in german here...

DY357LX wrote:(I can paste in the code if required but it's also on the above page.)

YOU are asking for help, so YOU should give us all the information we need. "Browse all the sites and tell me whats wrong" isn't a good choice of asking for help.

DY357LX wrote:I've created a test connection script (from this page) and it runs fine. (Says "CONNECTION SUCCESSFUL!")

But when I move to the next step (creating member tables using this page: http://www.developphp.com/view_tlesson.php?str=102xxphp_lessons)
I run into the following error:

Success in database file CONNECTION.....

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\Pete\scripts\create_Table.php on line 34
(I can paste in the code if required but it's also on the above page.)

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\Pete\scripts\create_Table.php on line 34
no TABLE created. You have problems in the system already, backtrack and debug!


ODBC@localhost is the default connection, if no connection is established. Your print out that the connection is established isn't wrong, but you use two very different php database classes (mysqli (mysql improved) and mysql). You established a mysqli instance but try to query a mysql instance (which doesn't exist)

php.net MySQL Reference
php.net MySQLi Reference

Hope that helps. And next time, take some time for your request for help, give us all the information in your thread and post into the right board.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests