<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff><FONT face=Arial size=2>
<DIV><BR>>  put "SELECT * FROM tblName WHERE tblName.Login = '" & 
field "login" & "'"<BR>>into  strSql<BR>>  get 
revdb_query(field "dbID",strSql)<BR>>  put "Welcome " & 
revdb_columnbyname(it,"fname") into field "MyMessage"<BR>>  
<BR>>  if revdb_recordcount(it) <= 0 then<BR>>    
put "Sorry, no login for " & field "login" & " in the 
database"<BR>>  else<BR>>    put "Welcome " & 
revdb_columnbyname(it,"fname") into field "MyMessage"<BR>>  end 
if<BR>></DIV>
<DIV>revdb_recordcount returns -1 for some databases (particularly MS Access), 
this is a bug in the database itself. A workaround is 
to fetch all the rows in the resultset until eof. RevDB does not do 
this because it could be very expensive for huge resultsets.</DIV>
<DIV> </DIV>
<DIV>repeat while revdb_iseof(tcursor) is true</DIV>
<DIV>    add 1 to recordcount</DIV>
<DIV>end repeat</DIV>
<DIV> </DIV>
<DIV>Below find a modified script</DIV>
<DIV> </DIV>
<DIV>put "SELECT * FROM tblName WHERE tblName.Login = '" & field "login" 
& "'" into  strSql<BR>get revdb_query(field "dbID",strSql)<BR>put 
"Welcome " & revdb_columnbyname(it,"fname") into field "MyMessage"<BR>if 
revdb_iseof(it) is true then</DIV>
<DIV>put "Sorry, no login for " & field "login" & " in the database" 
#first record is eof..resultset is empty </DIV>
<DIV> else</DIV>
<DIV>  put "Welcome " & revdb_columnbyname(it,"fname") into field 
"MyMessage"</DIV>
<DIV> end if<BR></DIV>
<DIV>Tuviah Snyder <<A 
href="mailto:tuviah@runrev.com">tuviah@runrev.com</A>> <<A 
href="http://www.runrev.com/">http://www.runrev.com/</A>><BR>Runtime 
Revolution Limited - The Solution for Software 
Development</DIV></FONT></BODY></HTML>