It seems to me that ADO is limited by the ODBC Driver you are connecting
with. With the MySQL ODBC driver, you can move through the recordset in a
single direction, in the order specified in the select statement. But you
cannot "skip" backwards or set the absolute position in the recordset:
ConnectionString1a = "DSN=NT2Buildings;User
Id=cjones;PASSWORD=spikeo;DB=buildings;SERVER=crjnt2;UID=cjones;PORT=;OPTION=0;STMT=;"
conn1 = Server.CreateObject('ADODB.Connection');
conn1.Open( ConnectionString1a );
sql = "SELECT DISTINCT bldgtype, tpl FROM projects ORDER BY bldgtype";
rs1 = Server.CreateObject("ADODB.Recordset");
rs1.Open( sql, conn1);
rs1.MoveFirst();
var i = 0;
while( !rs1.EOF )
{
bldg = rs1('bldgtype');
tpl = rs1('tpl');
Response.Write( "<h1>" + bldg + " " + tpl + "</h1>" );
rs1.MoveNext();
i++;
}%>
>It just occured to me, that maybe I'm only allowed to select a single row at
>a time from the table. If this is the case and I want to set up a form in
>my vbapp that allows me to move forward and backwards through it (to the
>first record and last, etc...) then how do I do this? Do I do this through
>sql logic and maybe the use of a numerical primary key, for example: would
>I perform a "select <field list> from table where <primary key> is
> greater
>than <current primary key> limit 1"?
>
>Hmmm...that would obviously work, but is it the right way?
>
>I hope this message is ontopic - please inform.
>
>Karl
>
>
>
>--
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread38995@stripped
>
>To unsubscribe, send a message to:
> <mysql-unsubscribe-cj=interlog.com@stripped>
Christopher R. Jones, P.Eng.
14 Oneida Avenue
Toronto, Ontario M5J 2E3
Tel. 416 203-7465
Fax. 416 203-3044
Email cj@stripped