FW: Help connect in aubit4gl
Herman Carrion L. <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
From: [email protected] To: [email protected] Subject: RE: [Aubit4gl-discuss] Help connect in aubit4gl Date: Mon, 12 Jan 2015 09:25:06 -0500 Hi. Thank you for your quick response. I download today the CVS code and compile, then shows me the following errors:...make[2]: *** [mysql.o] Error 1make[2]: se sale del directorio «/home/aubit4glsrc/lib/libsql/mysql»make[1]: *** [/home/aubit4glsrc/plugins-1.2_37/libSQL_mysql.so] Error 2make[1]: se sale del directorio «/home/aubit4glsrc/lib»make: *** [corecompile] Error 2 Thanks for the advice. Herman Carrion.Guayaquil-Ecuador. Date: Fri, 9 Jan 2015 20:04:53 +0000 Subject: Re: [Aubit4gl-discuss] Help connect in aubit4gl From: [email protected] To: [email protected] CC: [email protected]; [email protected] Ok, i've just added code to CVS which should allow this.. You can now run things like : MAINDEFINE lv_c1, lv_c2 INTEGERDEFINE lv_a INTEGER CONNECT TO test AS con1 USER "aubit4gl" USING "somepassword"DELETE FROM testtabINSERT INTO testtab VALUES("1234") CONNECT TO test1 AS con2 USER "aubit4gl" USING "somepassword" DELETE FROM testtab USE SESSION con1 FOR SELECT COUNT(*) INTO lv_c1 FROM testtab;USE SESSION con2 FOR SELECT COUNT(*) INTO lv_c2 FROM testtab; DISPLAY lv_c1DISPLAY lv_c2 SET SESSION TO con1DECLARE c1 CURSOR FOR SELECT * INTO lv_a FROM testtabFOREACH c1 DISPLAY "INSERTING : ", lv_a Use SESSION con2 FOR INSERT INTO testtab VALUES (lv_a)END FOREACH USE SESSION con1 FOR SELECT COUNT(*) INTO lv_c1 FROM testtab;USE SESSION con2 FOR SELECT COUNT(*) INTO lv_c2 FROM testtab;DISPLAY lv_c1DISPLAY lv_c2 END MAIN [ Here - i have 2 databases: test & test1 - and I'm inserting into one, then reading that to insert into the other ] Its obviously just a first draft - so treat with caution and report any bugs...If you need a binary or source tarball - let me know and I'll get one together over the weekend. I *think* the databases will still need to be on the same machine just for now if you want to do it "neatly" - but, the connection just uses "MYSQL_SERVER" from the environment - so you should be able to set that using CALL aclfgl_setenv("MYSQL_SERVER","newserver") in between CONNECTs On 8 January 2015 at 03:46, Herman Carrion L. <[email protected]> wrote: Hi everyone...and happy new year. Mi code:----------------------------------------------------------------------------------------- 1 DATABASE prueba 2 MAIN 3 4 DEFINE base1 CHAR(60) 5 DEFINE base2 CHAR(60) 6 DEFINE user1 CHAR(60) 7 DEFINE user2 CHAR(60) 8 DEFINE pass1 CHAR(60) 9 DEFINE pass2 CHAR(60) 10 11 LET base1="prueba" CLIPPED 12 LET base2="prueba_policentro" CLIPPED 13 LET user1="root" CLIPPED 14 LET user2="root" CLIPPED 15 LET pass1="fender" CLIPPED 16 LET pass2="fender" CLIPPED 17 18 CONNECT TO base1 AS con1 USER user1 USING pass1 19 20 SELECT * FROM usuarios 21 WHERE codigo="bodegaop" 22 23 END MAIN 24 ------------------------------------------------------------------------------------------ Compilation=Ok. Execution: ERROR. Err:Program ./k stopped at 'k.4gl', line number 20.Error status number -30156.Sessions not implemented. 4gl function call stack : MAIN my database is mysql with native connection. Thanks for the advice. Herman Carrion L.Guayaquil - EcuadorSouth America ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Aubit4gl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss ------------------------------------------------------------------------------ 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. vanity: www.gigenet.com _______________________________________________ Aubit4gl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss