在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
复制代码 代码如下: 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; } } |
请发表评论