For the the database host / name /password / databasename I use the connection file from Dreamweaver. But then I get kkeping this message:
Access denied for user 'ODBC'@'localhost' (using password: NO)
Now I've searched the internet for an answer but I didn't get it clear. Some point to the direction that the connection is already opened. But a database can handle multiple connections opened that's not very different from asp.net.
Now I've simplified the problem to three files. Database.php is the connection file from DW.
Groupnames.php is a file with a function that prints the id and groupnames and test.php calls this function.
But instead of that I get the message "Access denied for user 'ODBC'@'localhost' (using password: NO)"again.
I don't know what to do or what it means...
If somebody could tell me this I would be very grateful
string connetionString = null;
OdbcConnection cnn ;
connetionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=yourdatabasename.mdb;";
cnn = new OdbcConnection(connetionString);
try
{
cnn.Open();
MessageBox.Show ("Connection Open ! ");
cnn.Close();
}
catch (Exception ex)
{
MessageBox.Show("Can not open connection ! ");
}
source:
csharp-odbc-connection.htm
hope it will help you.
eldo.