Hello to all
My Scenario:
I have a project that use a MySql db stored on development machine as "localhost".
During the "Initialization" of the project, the connection is defined reading some info
stored in a .INI file (this below is an example of my .ini file)
[Connessione]
SERVERNAME=SERVERFARMA
SERVERIP=192.168.6.222
DATABASE=ASL_SpFarma
COMANDO1=COMANDO1.CMD
NETDRIVE=K:
IPSIPES=\\192.168.1.244\SIPES$
FILEFARMA1=\DATI\U1FFARM1
FILEFARMA2=\DATI\U1FFARM2
NETFOLDER=SPFARMA$
When i install the application on a client machine, despite i have described the new connection (that must be read from the .ini file) the program still try to connect to "localhost", generating, of course, an error message.
This is my code in the "Initialization" code of the project:
SERVERNAME= INIRead ("CONNESSIONE","SERVERNAME","X",fExeDir() + "\asl.ini")
SERVERIP = INIRead ("CONNESSIONE","SERVERIP","X",fExeDir() + "\asl.ini")
gnDistretto= INIRead ("CONNESSIONE","DISTRETTO","X",fExeDir() + "\asl.ini")
DATABASE=INIRead ("CONNESSIONE","DATABASE","X",fExeDir() + "\asl.ini")
COMANDO1=INIRead ("CONNESSIONE","COMANDO1","X",fExeDir() + "\asl.ini")
COMANDO2=INIRead ("CONNESSIONE","COMANDO2","X",fExeDir() + "\asl.ini")
HourGlass(True)
USERID="root"
PWD="mypass"
ServerFarma is Connection
// Connection Settings
ServerFarma..Provider = hNativeAccessMySQL
ServerFarma..User = USERID
ServerFarma..Password = PWD
ServerFarma..Server = SERVERIP
ServerFarma..Database = DATABASE
ServerFarma..Access = hOReadWrite
// Opening the connection
connresult=HOpenConnection(ServerFarma)
HChangeConnection("*",ServerFarma)
the "connresult" variable returns "True", also if you try to put a non existent IP Address.
I don't know the reason of this beahviour and i can't imagine where to find further
informations to solve this issue....
Some ideas??
Help is very appreciated.
Gianni