- 论坛徽章:
- 0
|
proc似乎不认识类的成员变量, 代码如下
class DbDomain
{
public :
//[function]
bool fetchDomain();
bool getDomainFromDb();
private:
EXEC SQL BEGIN DECLARE SECTION;
//[date]
char strDomainUrl[64 + 1];
char strDomainName[64 + 1];
int _iPvstate ;
int _iAdstate ;
int _iRefstate ;
int _iIpstate ;
EXEC SQL END DECLARE SECTION;
};
bool DbDomain::getDomainFromDb()
{
EXEC SQL DECLARE domain_cursor CUROSOR FOR
SELECT DOMAIN_URL, PVSTATE, ADSTATE, REFSTATE, IPSTATE FROM t_click_dic_analyse_domain;
EXEC SQL OPEN domain_cursor;
while (1)
{
exec sql fetch domain_cursor into : strDomainUrl, : strDomainName, : _iPvstate , : _iAdstate , : _iRefstate
, : _iIpstate ; //这里会提示找不到变量定义 似乎并不认识成员变量
if (sqlca.sqlcode == 1403)
{
break;
}
cout << strDomainUrl << endl;
}
return true;
} |
|