connection problem

connection problem

Postby glyfer » Mon 08 May 2006 22:43

Hi!
I've just downloaded the trial versionof mysqlNetmobile2.0 but when I tried to execute the demos, even a piece of testing code I made, I got the messagge "can't connect with 'name_of_mysql_server",

I read that I must use the IP address server instead of the server's name, so I did it, but Im still getting the same error message.

what can I do with this problem?, Im interested in purchasing your software (if its works )

I'd apreciate your help
thanks in advance
glyfer
 

Postby Alexey » Wed 10 May 2006 06:37

When exactly do you get this error? Please check the message. Is it correct?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

connection problem

Postby glyfer » Wed 10 May 2006 16:09

Hi!

I've got the error message when the code tries to open the server connection trough the open metod.

this the code Im trying to execute with no results


'crear una conexion con una base de datos
Dim myCn As New CoreLab.MySql.MySqlConnection
Try

myCn.ConnectionString = "server=192.168.0.1;uid=root;pwd=xxxxx;database=test"
'abrir conexion
myCn.Open() 'here occurs the error
If myCn.State = ConnectionState.Open Then
MessageBox.Show("La conexion de la base de datos ha sido exitosa", "Atención", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)

End If
Catch err As CoreLab.MySql.MySqlException

MessageBox.Show(err.Message, "Error")
End Try

Thanks
glyfer
 

Postby Alexey » Thu 11 May 2006 05:59

Please check the error message. We need exact wording.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Guest » Thu 11 May 2006 22:11

this is the error message:

"Can´t connect to Mysql server on '192.168.0.1'"

I've checked all needed to establish a connection: ports,mysql service, etc. In fact, when I do a test using another mysql.net controller (not compact framework projects), the connection and everything work fine.
Guest
 

Postby Alexey » Fri 12 May 2006 06:48

Your code works fine. If you connect using an emulator, refer to MSDN on how to make this correctly. If you have a real device, check the settings as well. Ensure you can connect to the Internet from your device at first.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL