Pro * C connection with Oracle [message #374833] |
Thu, 05 July 2001 07:13 |
Deidra
Messages: 1 Registered: July 2001
|
Junior Member |
|
|
I hope someone can help me with this.
I have the following code that should create a connection with an oracle database. When it is compiled it seems to work but a connection is not being met. I have included the code below if some can help me.
#include
#include
#include
EXEC SQL begin declare section;
char db_string20 = "voypanel";
char password20 = "miapia";
char userid20 = "dmullaly";
char db_name10 = "voypanel";
struct
{
int contractorid;
int testid;
varchar name21;
}test_info;
struct
{
short contractorid_ind;
short testid_ind;
short name_ind;
}test_info_ind;
EXEC SQL end declare section;
EXEC SQL DECLARE voypanel database;
void main()
{
char temp32;
//connect to oracle//
EXEC SQL CONNECT :userid IDENTIFIED BY :password at :db_name using :db_string;
cout << "Connected to oracle as user \n" << userid);
}
Thanks
Deidra
|
|
|