>i want to compare a username if it exist in the database
best would be a select for this
like
select * from your table where username = :YourUserName
but as you want
for iteration with a loop
Dataset.First;
while (not(Dataset.Eof) and (DataSet.FieldByName('User
if not(Dataset.Eof) then //found
hope this helkps
meikl ;-)
Main Topics
Browse All Topics





by: Ivanov_GPosted on 2004-05-12 at 06:17:40ID: 11049555
var found : Boolean;
begin
found := DBGrid1.DataSource.DataSet
if found then
ShowMessage('username MMM exists')
else
ShowMessage(user MMM does not exist);
end;