pro*c连接oracle并查询数据的一个例子
pro*c除了oracle-XE外都是在oracle安装的时候默认安装的。 一.新建一个pc文件demo01.pc内容如下: #include <stdio.h> #include <sqlca.h> void main() { char username[10],password[10],server[10]; char name[11]; int lid; printf("Enter the username: "); gets(username); printf("Enter the password: "); gets(password); printf("Enter the servername: "); gets(server); EXEC SQL CONNECT :username IDENTIFIED