Re: Error when using CONNEC TO and OPEN SESSION statement
Mike Aubury <[email protected]> Tue, 22 Mar 2022 10:21:14 +0000
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WFGqNTSuAqUKaaPtB-BnZrGh_AaH-EZZU0Kx78mLv+kLQ@mail.gmail.com> |
I've just checked here - and it works with A4GL_LEXTYPE=C, just fails for ESQL/C generation ? On Tue, 22 Mar 2022 at 00:51, Iwan AB <[email protected]> wrote: > Dear Mike, > > I got the following error: > > p_connect.ao: In function `connect_db2': > p_connect.c:(.text+0x981): undefined reference to `A4GLSQL_set_conn' > collect2: error: ld returned 1 exit status > > when compiling program with CONNECT TO statement as follow: > > DATABASE db1 > MAIN > IF connect_db2() THEN > DISPLAY "Connected to db2" > END IF > END MAIN > > FUNCTION connect_db2() > DEFINE w_db2 CHAR(30), w_user, w_pass CHAR(20) > > LET w_db2 = "/data/db2@server2" > LET w_user = "user" > LET w_pass = "password" > > WHENEVER ERROR CONTINUE > SET SESSION TO session_db2 > IF status = 0 THEN > RETURN TRUE > END IF > > CONNECT TO w_db2 AS session_db2 > USER w_user USING w_pass > IF status = 0 THEN > RETURN TRUE > END IF > WHENEVER ERROR STOP > > RETURN FALSE > > END FUNCTION > > the same error occurred with statement OPEN SESSION > > OPEN SESSION session_db2 TO DATABASE "/data/db2@server2" > AS USER w_user PASSWORD w_pass > > I use aubit4gl 1.5.3 with INFORMIX SE Engine > > Best regard, > > Iwan Abu Bakar > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. > www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > <#m_3434768610994415004_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > _______________________________________________ > Aubit4gl-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss > _______________________________________________ Aubit4gl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss