Hello,
I try to detect de connection with this..
FWCONNECT oCn HOST "localhost" USER "dario" PASSWORD "123456" DB "casa2"
// But the error is shown after the If sentenece.
if oCn == nil
Msginfo("Sin conexión)"
endif
Gracias.
How detect connection or not to MySql?
-
- Posts: 392
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
How detect connection or not to MySql?
Dario Fernandez
FWH, Harbour, BCC, MySql & MariaDB, tData, Dbf/Cdx
VSCode.
Maldonado - Uruguay
FWH, Harbour, BCC, MySql & MariaDB, tData, Dbf/Cdx
VSCode.
Maldonado - Uruguay
Re: How detect connection or not to MySql?
Hi,
Try this:
Try this:
Code: Select all
if oCn == nil
Msginfo("Sin conexión)"
elseif oCn:nError <> 0
Msginfo("Error: "+oCn:cError)
endif
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: How detect connection or not to MySql?
In case the connection fails, the connection error number and description are displayed and oCn is returned with nil value.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 392
- Joined: Wed Jul 31, 2013 1:14 pm
- Location: Maldonado - Uruguay
- Contact:
Re: How detect connection or not to MySql?
Lamentablemente no funciona.
El error es
2003
Can't connect to Mysql server on 'localhost' (10061)
Gracias.
El error es
2003
Can't connect to Mysql server on 'localhost' (10061)
Gracias.
Dario Fernandez
FWH, Harbour, BCC, MySql & MariaDB, tData, Dbf/Cdx
VSCode.
Maldonado - Uruguay
FWH, Harbour, BCC, MySql & MariaDB, tData, Dbf/Cdx
VSCode.
Maldonado - Uruguay
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: How detect connection or not to MySql?
10061: Could not connect to "localhost" with the credentials.
Make sure MySQL server service is running on your PC.
Also try "127.0. 0.1" instead of "localhost"
Check your installation, user privileges, etc.
First, try with MySQL workbench to connect.
Make sure MySQL server service is running on your PC.
Also try "127.0. 0.1" instead of "localhost"
Check your installation, user privileges, etc.
First, try with MySQL workbench to connect.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India