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 < 0 ) { return -1; } }
相关推荐
Seandba 2020-08-16
ILVNMM 2020-10-26
PinkBean 2020-08-19
徐建岗网络管理 2020-07-28
lynjay 2020-06-14
AaronPlay 2020-06-13
88384957 2020-06-12
herohope 2020-06-10
adwen00 2020-06-09
KilluaZoldyck 2020-06-06
hitxueliang 2020-06-05
lightindark 2020-06-03
baishuwei 2020-06-03
jediaellu 2020-05-31
twater000 2020-05-29
ItBJLan 2020-05-11
韩学敏 2020-05-09