CONNECTING FROM EMBEDDED-SQL/C

From: matzner <matzner_at_arlut.utexas.edu>
Date: 1996/11/05
Message-ID: <55o8qu$c6d_at_ns1.arlut.utexas.edu>#1/1


i am having difficulty connecting to databases using the 'at database' option from within an embedded sql/C.

the syntax (i know) is 'connect user/pass at database using :string where database has been declared using EXEC SQL DECLARE database DATABASE. the problems are:
1) is database (small case) the actual database name, or can i use a string variable or a host variable. if it's the actual name, i seem to have trouble using my db name because it contains a period. i tried quoting it which gives a compilation error- i think this is a bug.
2) what goes into :string in 'using :string'- is it even necessary to
define it, since the databases are local- there are 3 of them locally installed that needs to be separately accessed from within the code.

ps/ when i type 'connect user/pass _at_database' from within sqlplus this works successfully. even when i preclude the .suffix from the database name, it works. i tried this from within the code, replacing _at_ with at and using the database name without the .suffix but i get error -12303 or something like that.

can anyone help? Received on Tue Nov 05 1996 - 00:00:00 CET

Original text of this message