Help connect mysql with variables
Herman Carrion L. <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
Hi to all.The problem with connect in mysql is solved.But...
Only works with constant values like "myuser"
We need to work with variables like informix.
1 DATABASE data 2 MAIN 3 DEFINE myhost CHAR(60) 4 DEFINE mybase CHAR(60) 5 DEFINE myuser CHAR(60) 6 DEFINE mypass CHAR(60) 7 8 LET myhost="host1" 9 LET mybase="data1" 10 LET myuser="user1" 11 LET mypass="pass1" 12 13 CALL aclfgl_setenv("MYSQL_SERVER",myhost) 14 CONNECT TO mybase AS con1 USER myuser USING mypass 15 16 MESSAGE "Connect OK..." 17 END MAIN
Compilation Ok.
When execute:--------------------------------------------------------------------herman@sistemas: $ 4glpc example.4gl -o exampleherman@sistemas: $ ./exampleErr:Program ./example stopped at 'example.4gl', line number 13.Error status number -1.Unknown MySQL server host 'host1 ' (2).
4gl function call stack : MAIN
herman@sistemas: $----------------------------------------------------------How can use variables for connect to mysql ?
Best regards,Herman.
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss