Click here to Skip to main content
16,016,693 members
Home / Discussions / Mobile
   

Mobile

 
GeneralAccess Table some problem with new columns Pin
Rassul Yunussov20-Jan-04 19:55
Rassul Yunussov20-Jan-04 19:55 
GeneralRe: Access Table some problem with new columns Pin
João Paulo Figueira20-Jan-04 22:27
professionalJoão Paulo Figueira20-Jan-04 22:27 
Questioninstaller? Pin
slomoman20-Jan-04 3:01
slomoman20-Jan-04 3:01 
AnswerRe: installer? Pin
João Paulo Figueira20-Jan-04 3:49
professionalJoão Paulo Figueira20-Jan-04 3:49 
GeneralRe: Wireless Communication Pin
misha_grewal18-Jan-04 23:50
misha_grewal18-Jan-04 23:50 
GeneralRe: Wireless Communication Pin
Mahesh Varma20-Jan-04 22:01
Mahesh Varma20-Jan-04 22:01 
GeneralRe: Wireless Communication Pin
annum22-Jan-04 16:55
annum22-Jan-04 16:55 
GeneralDatabase Pin
Rassul Yunussov18-Jan-04 19:37
Rassul Yunussov18-Jan-04 19:37 
I have some question about CADORecordset.
I've got the code like this:
void CAccessLayer::Repaint()
{
	CADORecordset rs(&g_db);
	CString Query;
	Query = "SELECT * FROM Points WHERE LayerID = "+m_LayerID;
	int X;
	int Y;
	if(rs.Open(Query,CADORecordset::openQuery))
	{
		rs.MoveFirst();
		for(int i = 0; !rs.IsEof(); rs.MoveNext(), ++i)
		{
			rs.GetFieldValue(_T("X"),X);
			rs.GetFieldValue(_T("Y"),Y);
			X=(_BitmapWidth*(_rotate*X - _ViewLeft))/_WR;
			Y=(_BitmapHeight*(_rotate*Y - _ViewTop))/_HR;
			_BitmapCanvas->Ellipse(X-100,Y-100,X+100,Y+100);
		}
	}
	rs.Close();

}

but i use this function very often, and i'd like to place the query in the constructor of the class. And i want to call in the function only this:
void CAccessLayer::Repaint()
{
                rs->MoveFirst();
		for(int i = 0; !rs->IsEof(); rs->MoveNext(), ++i)
		{
			rs->GetFieldValue(_T("X"),X);
			rs->GetFieldValue(_T("Y"),Y);
			X=(_BitmapWidth*(_rotate*X - _ViewLeft))/_WR;
			Y=(_BitmapHeight*(_rotate*Y - _ViewTop))/_HR;
			_BitmapCanvas->Ellipse(X-100,Y-100,X+100,Y+100);
		}
}

And in constructor i have this :
rs = new CADORecordset(&g_db);
CString Query;
Query = "SELECT * FROM Points WHERE LayerID = "+m_LayerID;
rs->Open(Query,CADORecordset::openQuery));

But my programm doesn't work. Is it necessery to have CADORecordset locally???
Thaks.
GeneralRe: Database Pin
João Paulo Figueira19-Jan-04 4:45
professionalJoão Paulo Figueira19-Jan-04 4:45 
GeneralWireless Communication Pin
Mahesh Varma16-Jan-04 21:36
Mahesh Varma16-Jan-04 21:36 
GeneraleMbedded Visual C++ 3.0 Pin
dhdhaha16-Jan-04 21:12
dhdhaha16-Jan-04 21:12 
GeneralRe: eMbedded Visual C++ 3.0 Pin
João Paulo Figueira18-Jan-04 5:07
professionalJoão Paulo Figueira18-Jan-04 5:07 
GeneralRe: eMbedded Visual C++ 3.0 Pin
P_JAYAPRAKASH23-Jan-04 3:10
P_JAYAPRAKASH23-Jan-04 3:10 
Generalclass for uuencode/uudecode on pocket pc Pin
bryce16-Jan-04 18:05
bryce16-Jan-04 18:05 
GeneralMore weirdness Pin
#realJSOP16-Jan-04 6:27
professional#realJSOP16-Jan-04 6:27 
GeneralRe: More weirdness Pin
cmk17-Jan-04 9:10
cmk17-Jan-04 9:10 
GeneralRe: More weirdness Pin
João Paulo Figueira20-Jan-04 3:54
professionalJoão Paulo Figueira20-Jan-04 3:54 
GeneralWeb Services on the Pocket PC with .NET Compact Framework Pin
Colin Angus Mackay16-Jan-04 3:19
Colin Angus Mackay16-Jan-04 3:19 
Generalaccess the pda's addressbook Pin
slomoman15-Jan-04 3:01
slomoman15-Jan-04 3:01 
GeneralRe: access the pda's addressbook Pin
João Paulo Figueira15-Jan-04 4:49
professionalJoão Paulo Figueira15-Jan-04 4:49 
GeneralTMobile ROM Upgrade to WM2003 Pin
alaa_m15-Jan-04 0:22
alaa_m15-Jan-04 0:22 
QuestionCan I Use AT Commands for CDMA Pin
misha_grewal14-Jan-04 3:08
misha_grewal14-Jan-04 3:08 
General.inf How to create new folder Pin
Rassul Yunussov13-Jan-04 4:41
Rassul Yunussov13-Jan-04 4:41 
GeneralRe: .inf How to create new folder Pin
João Paulo Figueira13-Jan-04 5:21
professionalJoão Paulo Figueira13-Jan-04 5:21 
QuestionHow to know the default Documents folder Pin
Cedric Moonen12-Jan-04 20:48
Cedric Moonen12-Jan-04 20:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.