Advertisement

09.06.2006 at 01:17AM PDT, ID: 21979391
[x]
Attachment Details

Connecting to mySQL through .NET

Asked by GavinMannion in Programming for ASP.NET

Tags: mysql, connect, any

For some reason I cannot get this to work at the office. Can someone see the problem?

I have the following

DataSet ds = new DataSet();
MySqlCommand myCommand = new MySqlCommand("SELECT MoveID, MovieName FROM Movies");
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "server=AD3558; user id=root; password=mypass; database=mydb; pooling=false;" ;
myCommand.CommandType = CommandType.Text;
myCommand.Connection = oMySqlConn;

try
{
 myCommand.Connection.Open();
 MySqlDataAdapter da = new MySqlDataAdapter(myCommand);
 da.Fill(ds);
}
finally
{
 myCommand.Connection.Close();
}

I then get the following error

Additional information: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

If I change the server to be . or localhost I get

Additional information: Unable to connect to any of the specified MySQL hosts

I have now written the entire application without being able to test... if I can get this to connect I should be doneStart Free Trial
[+][-]09.06.2006 at 03:17AM PDT, ID: 17461852

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.06.2006 at 03:23AM PDT, ID: 17461880

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2006 at 05:25AM PDT, ID: 17462495

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.06.2006 at 05:36AM PDT, ID: 17462585

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2006 at 07:59AM PDT, ID: 17463640

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Tags: mysql, connect, any
Sign Up Now!
Solution Provided By: GaryFrancisLond
Participating Experts: 3
Solution Grade: B
 
 
[+][-]09.07.2006 at 12:22AM PDT, ID: 17468705

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32