List:General Discussion« Previous MessageNext Message »
From:Christopher R. Jones Date:June 1 2000 4:24pm
Subject:Re: VB ADO and Moving around a recordset
View as plain text  
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 
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);
var i = 0;
while( !rs1.EOF )
         bldg = rs1('bldgtype');
         tpl = rs1('tpl');
         Response.Write( "<h1>" + bldg + "&nbsp;" + tpl + "</h1>" );

>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.
>Please check "" before
>posting. To request this thread, e-mail mysql-thread38995@stripped
>To unsubscribe, send a message to:
>     <>

Christopher R. Jones, P.Eng.
14 Oneida Avenue
Toronto, Ontario M5J 2E3
Tel. 416 203-7465
Fax. 416 203-3044
Email cj@stripped

VB ADO and Moving around a recordsetKarl J. Stubsjoen1 Jun
  • Re: VB ADO and Moving around a recordsetJames Treworgy1 Jun
  • Re: VB ADO and Moving around a recordsetChristopher R. Jones1 Jun
    • converting Access DB to MySQLTim Olsen1 Jun
      • Re: converting Access DB to MySQLmiguel sol√≥rzano2 Jun
      • RE: converting Access DB to MySQLJacques Venter3 Jun