ProC 连接Oracle代码
时间:2021-05-13 08:14:18|栏目:Oracle|点击: 次
复制代码 代码如下:
int connectDb()
{
EXEC SQL BEGIN DECLARE SECTION;
char username[20];
char password[20];
char connect_string[20];
EXEC SQL END DECLARE SECTION;
strcpy(username,"lbc1");
strcpy(password,"lbtux");
strcpy(connect_string, "lbc1");
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :connect_string;
if ( sqlca.sqlcode < 0 )
{
return -1;
}
}
栏 目:Oracle
下一篇:oracle监控某表变动触发器例子(监控增,删,改)
本文标题:ProC 连接Oracle代码
本文地址:http://www.codeinn.net/misctech/120666.html