Article View: borland.public.cppbuilder.database.multi-tier
Article #1830Compiling Interbase SQL code in BCB1.0 problem
From: João Paulo Carvalho
Date: Mon, 22 Mar 1999 00:00
Date: Mon, 22 Mar 1999 00:00
69 lines
2618 bytes
2618 bytes
I�m tryng to generate an application that change the user_name at runtime, but the preprocessor(gpre version 4.2 for Windows) is fighting with me :-( How my application can be logged in for more than one user, i�m using in the top of module the following statements,... EXEC SQL BEGIN DECLARE SECTION; char szMyDbPathVar[256]; char szMyUserNameVar[32]; char szMyUserPassVar[9]; EXEC SQL SET DATABASE my_db_handle = COMPILETIME "my_db_path" USER "my_sysdba_user" PASSWORD "the_pass" RUNTIME :szMyDbPathVar USER :szMyUserNameVar PASSWORD :szMyUserPassVar; EXEC SQL END DECLARE SECTION; ..., and i�m preprocessing that with the following statement, gpre -c -m my_source_module_name * "my_source_module_name" is a C source code file that handles all of yours transactions. But the preprocessed code, doesn�t work. Looking to the code, i saw that gpre just preprocess it, until the RUNTIME :szMyDbPathVar clause in my SET DATABASE statement. The USER :szMyUserNameVar and PASSWORD :szMyUserPassVar clauses are not preprocessed and, are throwed in my C code. Just like that! So, when i�m gonna compile that code, the compiler(CB1.0) says that "the :szMyUserNameVar token are not previously defined, and the data type USER isn't defined". OK! It didn't work! But i'm still has the option to use a statement like,... EXEC SQL CONNECT :szMyDbPathVar USER :szMyUserNameVar PASSWORD :szMyUserPassVar; and, bypass all database handles definitions! Now i throw away all SET DATABASE statements and work only with CONNECTs; but it still don't work. When i compile the code generated by "gpre": OK! But now when i link the obj file with the interbase library(Gds32.lib) i got a "unreference isc_expand_dpb()" error! But that is the only IB function wich is unrefenced in gds32.lib. If somebody there knows whats happening(or in the others words what i'm doing wrong), ... ...i'm waiting for that!!! thanks all, Jo�o Paulo Carvalho cocel09@ufu.br
Technical Details
Message-ID:
<36F6C02D.BB82C861@ufu.br>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fcd2b,24cc689891216f73,start X-Google-Attributes: gidfcd2b,public From: João Paulo Carvalho <cocel09@ufu.br> Subject: Compiling Interbase SQL code in BCB1.0 problem Date: 1999/03/22 Message-ID: <36F6C02D.BB82C861@ufu.br> X-Deja-AN: 457725551 Content-Transfer-Encoding: 8bit X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier