Click here to Skip to main content
15,742,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this error:
Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol "public: int __thiscall CADORecordset::GetFieldValue(wchar_t const *,class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > &,class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (?GetFieldValue@CADORecordset@@QAEHPB_WAAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@V23@@Z) referenced in function "public: void __thiscall CEstatisDlg::OnBnClickedQuery(void)" (?OnBnClickedQuery@CEstatisDlg@@QAEXXZ)	Estatis	C:\Dev2015\Prg\Estatis\EstatisDlg.obj	1	

I wrote:
void CEstatisDlg::new_query_pelli(CString &strQuery)
	strQuery = _T("SELECT * FROM CUTTING ");


void CEstatisDlg::OnBnClickedQuery()
	DWORD							lPezzi, lTagliati, lPezziTot, lTagliatiTot, nPelliScan, nPelliCut, nPelliNest;
	DOUBLE							dArea, dResa, dSecTaglio, dAreaTot, dAreaDic, dSecTaglioTot, dAreaPezziTot, dResaTot, dDich, dPezzi, dDistKnife, dDistKnifeTot;
	CString							strQuery, strProg, strCodice, strCommessa, strLotto, strMateriale, strOperatore, strAreaCalc;
	CString							strPezzi, strResa, strTagliati, strTempoTaglio, strDataScanner, strAreaDich, strKnifeCutting;
	COleDateTime					dtScanner;
	CListCtrl *pWnd = (CListCtrl *)GetDlgItem(IDC_LISTA);
	m_dwRowTot = 0;
	pWnd->DeleteAllItems();													// cancello tutte le righe presenti

													// cancello tutte le righe presenti

	lPezziTot = lTagliatiTot = 0;
	dAreaTot = dAreaDic = dSecTaglioTot = dAreaPezziTot = dResaTot = dDistKnifeTot = 0.0;

	if (m_rsPelli.Open(DB->m_pConnection, strQuery, CADORecordset::openQuery))

What I have tried:

I have problem when I open recordset
Updated 16-Oct-19 22:07pm

1 solution

You cannot have a problem opening a record set since your application will not even build correctly. You need to include the correct library in your project. I assume you are trying to use A set of ADO classes - version 2.20[^].
Share this answer
Member 14594285 17-Oct-19 8:51am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900