connect to mysql server
connect to mysql server
Hil All !
how to connect this php on FWH
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_cn = "localhost";
$database_cn = "mydata";
$username_cn = "myuser";
$password_cn = "mypassword";
$cn = mysql_pconnect($hostname_cn, $username_cn, $password_cn) or trigger_error(mysql_error(),E_USER_ERROR);
?>
notes :
hostname "localhost" OK when apache server running on my computer
the problem is when server running on (e.g) www.mysite.com
Regards
Areang
how to connect this php on FWH
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_cn = "localhost";
$database_cn = "mydata";
$username_cn = "myuser";
$password_cn = "mypassword";
$cn = mysql_pconnect($hostname_cn, $username_cn, $password_cn) or trigger_error(mysql_error(),E_USER_ERROR);
?>
notes :
hostname "localhost" OK when apache server running on my computer
the problem is when server running on (e.g) www.mysite.com
Regards
Areang
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: connect to mysql server
Try using ADO. You can find the connection string on:areang wrote:how to connect this php on FWH
http://www.connectionstrings.com
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Hi all
The OleDB feature don't work with MySQL and Fivewin, OleDB is directed to .NET languages.
You can work with MySQL using MyODBC and this example string:
You need install in your machine MySQL 4(5 is not recomended to beginning) and MyODBC 3.51(best version).
You need a easy Front-End and you can download MySQL-Front, easy install and easy to use.
A have developed one Library to use all features of ADO, working with MySQL, SQL-Server, Firebird, Access, XLS, XML, SQLite e much more. You can download-it in http://www.shoppmarketing.com/blogADO e see the examples of use.
The new version accept SQL command directly in Fivewin code e have work to open various diferent connection at same time.
The OleDB feature don't work with MySQL and Fivewin, OleDB is directed to .NET languages.
You can work with MySQL using MyODBC and this example string:
Code: Select all
StrDatabase := [mysql] // YouDatabaseName
StrServer := [127.0.0.1] // or remote IP ex: 202.204.69.101
StrPort := 3306
StrUserID := [root]
StrUserPWD := [] // User ROOT don't use password
StrDriver := "MySQL ODBC 3.51 Driver"
StrConnection := "driver={" + StrDriver +"}" + ;
";database=" + StrDatabase + ;
";server=" + StrServer + ;
";uid=" + StrUserID + ;
";pwd=" + StrUserPWD + ;
";option=3;"
You need a easy Front-End and you can download MySQL-Front, easy install and easy to use.
A have developed one Library to use all features of ADO, working with MySQL, SQL-Server, Firebird, Access, XLS, XML, SQLite e much more. You can download-it in http://www.shoppmarketing.com/blogADO e see the examples of use.
The new version accept SQL command directly in Fivewin code e have work to open various diferent connection at same time.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
All right Mr. Enrico
it forgives my deceit
The OleDB Driver is not disponible in MySQL Site. I found it forgotten in http://download.softagency.net/MySQL/Downloads/Win32/.
AreaNG
You can a test with a server side of my Captor application. Download in http://www.shoppmarketing.com/forum/eserver.exe
The test consist in click on elements of tree to filter registers in the browse.
Part of program:
This is part of MainBrowse():
You can use test José Luis Capel class too. Found it in www.capelblog.com.
it forgives my deceit
The OleDB Driver is not disponible in MySQL Site. I found it forgotten in http://download.softagency.net/MySQL/Downloads/Win32/.
AreaNG
You can a test with a server side of my Captor application. Download in http://www.shoppmarketing.com/forum/eserver.exe
The test consist in click on elements of tree to filter registers in the browse.
Part of program:
Code: Select all
ADORDDDefault( "MySQL" )
StrConnection := "driver={" + StrDriver +"}" + ";database=" + StrDatabase + ;
";server=" + StrServer + ;
";uid=" + StrUserID + ;
";pwd=" + StrUserPWD + ;
";option=3;"
ADO CONNECT StrConnection
if .not. ADOConnected()
? "Conexao nao foi estabilizada. Aplicativo sera fechando."
return .f.
endif
ADO USE clientes
ADO USE proposta
MainBrowse()
ADO CLOSE
This is part of MainBrowse():
Code: Select all
@ 0,205 LISTBOX oLbx2 FIELDS SIZE 300,200 PIXEL OF oWnd
oLbx2:bLine := {|| { str(ADOField( "idfilial" ),5), ;
str(ADOField( "idproposta" ),6), ;
LoadResources(MostraStatus(ADOField("status"))), ;
ADOField( "nome" ), ;
alltrim(ADOField( "marca" ))+"-"+ADOField( "modelo" ), ;
ADOField( "cic" ), ;
transf( ADOField( "financiado" ), "@e 999,999.99" ), ;
transf( ADOField( "entrada" ), "@e 999,999.99" ), ;
transf( ADOField( "prazo" ), "@e 999,999.99" ), ;
transf( ADOField( "parcela" ), "@e 999,999.99" ) } }
Mr. Rochinha.
Thank's for replay
I don't have any function for all ADO
Where is it ?
Regards
Areang
Thank's for replay
Code: Select all
ADORDDDefault( "MySQL" )
StrConnection := "driver={" + StrDriver +"}" + ";database=" + StrDatabase + ;
";server=" + StrServer + ;
";uid=" + StrUserID + ;
";pwd=" + StrUserPWD + ;
";option=3;"
ADO CONNECT StrConnection
if .not. ADOConnected()
? "Conexao nao foi estabilizada. Aplicativo sera fechando."
return .f.
endif
ADO USE clientes
ADO USE proposta
MainBrowse()
ADO CLOSE
@ 0,205 LISTBOX oLbx2 FIELDS SIZE 300,200 PIXEL OF oWnd
oLbx2:bLine := {|| { str(ADOField( "idfilial" ),5), ;
str(ADOField( "idproposta" ),6), ;
LoadResources(MostraStatus(ADOField("status"))), ;
ADOField( "nome" ), ;
alltrim(ADOField( "marca" ))+"-"+ADOField( "modelo" ), ;
ADOField( "cic" ), ;
transf( ADOField( "financiado" ), "@e 999,999.99" ), ;
transf( ADOField( "entrada" ), "@e 999,999.99" ), ;
transf( ADOField( "prazo" ), "@e 999,999.99" ), ;
transf( ADOField( "parcela" ), "@e 999,999.99" ) } }
Where is it ?
Regards
Areang