Показать сообщение отдельно
Старый 08.12.2001, 03:43   #2  
Роман Кошелев is offline
Роман Кошелев
Продавец игрушек
Аватар для Роман Кошелев
 
433 / 73 (3) ++++
Регистрация: 22.11.2001
Адрес: Москва
Lightbulb
Действительно, Антон описывал как заставить грид встать на нужную запись.

Твою проблему можно решить так:<pre><b>while</b> select * from tTable1
{
print tTable.name; <font color=green>// или любые другие действия</font>
}

</pre>

или так:<pre>select * from table1;
while (tTable1.<b>recid</b>)
{
next tTable1;
}
</pre>

где <b>recid</b> -- системный идентификатор записи

<hr>
<b>см. также "Руководство разработчика", "Select statement"</b><pre><font color=#AAAAAA>void SelectRecordExamples()
{
CustTable custtable;
//A customer is found and returned in Custtable
select * from Custtable;
// A customer with account number > “100” is found
select * from Custtable
where AccountNo > “100”;
/* The customer with the LOWEST account number > “100” is found,
that is, CBS with number 200. */
select * from Custtable order by AccountNo
where AccountNo > “100”;
next Custtable; // The next customer is read, i.e. Walt Disney
/* The customer with the HIGHEST account number
(greater than 100) is found: Pentagon */
<b>select * from Custtable order by AccountNo DESC
where AccountNo > “100”;
next Custtable; // The next record is read (DESC) = Ford Motor</b>
// The customer with the HIGHEST account number is found: Pentagon
select reverse Custtable order by AccountNo;
/*The customer with the “lowest” name and account number
in the interval ]100;1000[ is found. This is CBS. */
select * from Custtable order by NameRef
where AccountNo > “100”
&& AccountNo < “1000”;
/* The COUNT select returns the number of customer accountnumbers (customers): 5 */
select count(AccountNo) from CustTable;
print Custtable.AccountNo; // Prints the result of the count
// (which is in AccountNo)
/* Returns the Sum of balances for non-blocked customers. The result is:
SUM: $1,060,000, stored in the Balance field
*/
select sum(Balance) from Custtable
where Blocked == DebCreBlocked::No;
}
</font>
</pre>
__________________
С уважением, Роман Кошелев.