Home > Database > Mysql Tutorial > ProC 连接Oracle代码

ProC 连接Oracle代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 18:06:05
Original
1210 people have browsed it

一段简单的ProC连接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 {
return -1;
}
}
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template