<!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>&gt;&nbsp; put "SELECT * FROM tblName WHERE tblName.Login = '" &amp; 
field "login" &amp; "'"<BR>&gt;into&nbsp; strSql<BR>&gt;&nbsp; get 
revdb_query(field "dbID",strSql)<BR>&gt;&nbsp; put "Welcome " &amp; 
revdb_columnbyname(it,"fname") into field "MyMessage"<BR>&gt;&nbsp; 
<BR>&gt;&nbsp; if revdb_recordcount(it) &lt;= 0 then<BR>&gt;&nbsp;&nbsp;&nbsp; 
put "Sorry, no login for " &amp; field "login" &amp; " in the 
database"<BR>&gt;&nbsp; else<BR>&gt;&nbsp;&nbsp;&nbsp; put "Welcome " &amp; 
revdb_columnbyname(it,"fname") into field "MyMessage"<BR>&gt;&nbsp; end 
if<BR>&gt;</DIV>
<DIV>revdb_recordcount returns -1 for some databases (particularly MS Access), 
this is a bug in&nbsp;the database&nbsp;itself. A workaround&nbsp;is 
to&nbsp;fetch all the rows in the resultset until eof. RevDB does not&nbsp;do 
this because it could be very expensive for huge resultsets.</DIV>
<DIV>&nbsp;</DIV>
<DIV>repeat while revdb_iseof(tcursor) is true</DIV>
<DIV>&nbsp;&nbsp;&nbsp; add 1 to recordcount</DIV>
<DIV>end repeat</DIV>
<DIV>&nbsp;</DIV>
<DIV>Below find a modified script</DIV>
<DIV>&nbsp;</DIV>
<DIV>put "SELECT * FROM tblName WHERE tblName.Login = '" &amp; field "login" 
&amp; "'" into&nbsp; strSql<BR>get revdb_query(field "dbID",strSql)<BR>put 
"Welcome " &amp; revdb_columnbyname(it,"fname") into field "MyMessage"<BR>if 
revdb_iseof(it) is true&nbsp;then</DIV>
<DIV>put "Sorry, no login for " &amp; field "login" &amp; " in the database" 
#first record is eof..resultset is empty&nbsp;</DIV>
<DIV>&nbsp;else</DIV>
<DIV>&nbsp; put "Welcome " &amp; revdb_columnbyname(it,"fname") into field 
"MyMessage"</DIV>
<DIV>&nbsp;end if<BR></DIV>
<DIV>Tuviah Snyder &lt;<A 
href="mailto:tuviah@runrev.com">tuviah@runrev.com</A>&gt; &lt;<A 
href="http://www.runrev.com/">http://www.runrev.com/</A>&gt;<BR>Runtime 
Revolution Limited - The Solution for Software 
Development</DIV></FONT></BODY></HTML>