fr studio 4.8 ADOQuery problem in vc2010
hi
i find an big problem in vc2010,
my code
IfrxReportPtr pReport(__uuidof(TfrxReport));
IfrxADODatabasePtr pDB(__uuidof(TfrxADODatabase));
IfrxADOQueryPtr pQR(__uuidof(TfrxADOQuery));
pDB->ConnectionString = _bstr_t(L"Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXXXX;Data Source=XXX.XXX.XX.XXX;");
pDB->LoginPrompt = false;
pDB->Connected = true;
pQR->Database = pDB;
pQR->Name = _bstr_t(L"XXX");
pQR->Query = _bstr_t(L"SELECT * FROM XXX");
if (pReport->LoadReportFromFile(bstrReportFile) != S_OK)
{
return FALSE;
}
pReport->SelectDataset(true, IfrxDataSetPtr(pQR));
pReport->EngineOptions->ConvertNulls = false;
pReport->PrepareReport(true);
pReport->ShowReport();
pDB->Connected = false;
......
in this pQR->Query = _bstr_t(L"SELECT * FROM XXX"); i find a exception exception "0x7c812afb : 0x0EEDFADE: 0xeedfade"
after this , output a error can't find odbc database source
when i use DesignReport to see , can't find any fields in table
error in 1.jpg
fastreport3.dll version 4.8.203.0
i find an big problem in vc2010,
my code
IfrxReportPtr pReport(__uuidof(TfrxReport));
IfrxADODatabasePtr pDB(__uuidof(TfrxADODatabase));
IfrxADOQueryPtr pQR(__uuidof(TfrxADOQuery));
pDB->ConnectionString = _bstr_t(L"Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXXXX;Data Source=XXX.XXX.XX.XXX;");
pDB->LoginPrompt = false;
pDB->Connected = true;
pQR->Database = pDB;
pQR->Name = _bstr_t(L"XXX");
pQR->Query = _bstr_t(L"SELECT * FROM XXX");
if (pReport->LoadReportFromFile(bstrReportFile) != S_OK)
{
return FALSE;
}
pReport->SelectDataset(true, IfrxDataSetPtr(pQR));
pReport->EngineOptions->ConvertNulls = false;
pReport->PrepareReport(true);
pReport->ShowReport();
pDB->Connected = false;
......
in this pQR->Query = _bstr_t(L"SELECT * FROM XXX"); i find a exception exception "0x7c812afb : 0x0EEDFADE: 0xeedfade"
after this , output a error can't find odbc database source
when i use DesignReport to see , can't find any fields in table
error in 1.jpg
fastreport3.dll version 4.8.203.0
Comments
my code
***************************************************************************************
IfrxReportPtr pReport(__uuidof(TfrxReport));
IfrxADODatabasePtr pDB(__uuidof(TfrxADODatabase));
IfrxADOQueryPtr pQR(__uuidof(TfrxADOQuery));
pDB->ConnectionString = _bstr_t(L"Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXXXX;Data Source=XXX.XXX.XX.XXX;");
pDB->LoginPrompt = false;
pDB->Connected = true;
pQR->Database = pDB;
pQR->Name = _bstr_t(L"XXX");
pQR->Query = _bstr_t(L"SELECT * FROM XXX");
pReport->SelectDataset(true, IfrxDataSetPtr(pQR));
if (pReport->LoadReportFromFile(bstrReportFile) != S_OK)
{
return FALSE;
}
pReport->EngineOptions->ConvertNulls = false;
pReport->PrepareReport(true);
pReport->ShowReport();
pDB->Connected = false;
**********************************************************************************************