Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing pointer in CDaoRecordset ... 1

Status
Not open for further replies.

HadiRezaee

Technical User
Joined
Mar 9, 2001
Messages
165
Location
IR
Hi all,
I want to know how can i change pointer with giving the number for pointing ???
I mean, when i give 2 to function it must point to record two ...

I have algorothm for myself:

m_rs->Move(lLink - m_rs->GetAbsolutePosition() - 1);

lLink is variable that i get of user for pointing ...

Do you have any good idea ?


My month article: Game programming by DirectX by Lan Mader.
Please visit in:
Hadi Rezaie
 
Move(CRecordSet* x, pos)
{
x->MoveFirst;
x->Move(pos);
} John Fill
1c.bmp


ivfmd@mail.md
 
Move(CRecordSet* x, pos)
{
x->MoveFirst();
x->Move(pos);
} John Fill
1c.bmp


ivfmd@mail.md
 
Hi John, thanks for your reply ...
Is any other way to changing pointer position ?
 
How about x->MoveNext()?

Like This:
x->MoveFirst()
while(!x->IsEOF())
{
//do something here
x->MoveNext();
}

This is more convenient I think,
Hope this helps,
s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Oh, Ion,
how about to change position to 100 so:
for(int i=0;i<100;i++)
{
x->MoveNext();//?
}
is too expensive John Fill
1c.bmp


ivfmd@mail.md
 
Sorry, I didn't understand the question right.

:)))

Of course is expensive. s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top