i used example in demo directory to connect Datatbase.
I used "ansidyn1" example. But i can connect to my DB.
I have just modified oracle_connect in sample code(in ansidyn1.pc),follow it:
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR username[128];
VARCHAR password[32];
char DB_NAME[30] = "servertest";
char db_string[20]= "vitcendb";
EXEC SQL END DECLARE SECTION;
......
EXEC SQL CONNECT :username IDENTIFIED BY :password
AT :DB_NAME USING :db_string;
and in my tnsname.ora
servertest =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.176.191)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = vitcendb)
)
)
i compiled in in VC6++(using ansidyn.dsp) but cant connect to DB
please tell me what's wrong?
username and password is correct!
thanks much!
[Updated on: Sun, 30 November 2008 20:32]
Report message to a moderator