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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display multil records from database

Status
Not open for further replies.

ora06

Programmer
Feb 11, 2004
15
FR

I work with oracle and VC++ , ADO
I use this to manipulate data

sSQL.Format("SELECT finger_id FROM other_info WHERE card_id = 20000");

recordset->Open(_variant_t(sSQL),connection.GetInterfacePtr(),adOpenForward Only,adLockReadOnly,adCmdText);

there are more than 2 records in this recordset. I want to display all of them by a data_grid.

Please help me to handle this problem.
Thanks in advance

 
You can navigate through the recordset via MoveNext and get the information.

Matt
 
I see only one column in this SQL given by you:
SELECT finger_id FROM other_info WHERE card_id = 20000

The column is finger_id. So you should psecify more columns in the SQL :)

Ion Filipski
1c.bmp
 

For one person can have 10 fingers
So i want display all 10 finger_id when i enter 1 card_id
I want display them by data_grid

I use recordset->GetRecordCount()
but when i debug it return = -1 ( no detection )
when infact there are more than 3 record

Plzz help me !
 
first of all, if you get an error, chech what did the previous function returned. It it was executed without errors, see if returned data makes sence.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top