Re: ado recordset.recordcount has value 0

From: Victor Koch ("Victor)
Date: 02/24/04


Date: Tue, 24 Feb 2004 12:27:06 -0300

Hi pherms, i believe is better use BOF and EOF properties to know if a
recordset have records.

Rs.Open "SELECT ................"

If Rs.BOF = False And Rs.EOF = False Then
    ' Recordset have records
else
    ' Recordset don't have records
endif

RecordCount Property is not supported for all providers.

--
 Víctor Koch From Argentina.
"pherms" <pherms@planet.nl> escribió en el mensaje
news:63B09C44-6CE7-440A-8A1A-BE353A3616A6@microsoft.com...
> I have this really weird problem.
> When I query a database with a string, which I know will return only one
record, by using an asp page, the recordcount object of the adodb.recordset
has value 0. I do know that the sql query I use is ok, because I tested it
in my database app.
>
> I use Windows 2003 server as the asp platform and I use mysql 4.0.18 ad
the database.
>
> Please can anyone help me? It's dirving me crazy!


Relevant Pages

  • Re: .BOF and .EOF are lying!
    ... "empty set of records sets the BOF and EOF properties to ... the BOF or EOF properties. ... "When you use Requery, the first record in the Recordset ...
    (microsoft.public.access.gettingstarted)
  • Re: How to check if recordset returned is empty?
    ... If you open a Recordset object containing no records, the BOF and EOF properties are set to True ... > But since the table is too big to do a findfirst I prefer ...
    (microsoft.public.access.modulesdaovba)
  • Re: .BOF and .EOF are lying!
    ... > "An OpenRecordset method internally invokes a MoveFirst ... > "empty set of records sets the BOF and EOF properties to ... > the BOF or EOF properties. ... the first record in the Recordset ...
    (microsoft.public.access.gettingstarted)
  • Re: Connection types and speeds
    ... The memory used by holding the connection open is not ... All recordset inserts seen to consequently have 0ms execution time, ... actually written to the database while the code has regained control ... RecordsetClone of a form) when a transaction was rolled back, ...
    (microsoft.public.access.queries)
  • Re: Validate logins with ASP, MS Access and Cookies error
    ... return another column from the database that stores the users 1st name :-) ... 'create connection and recordset objects ... Set cnStr = Server.CreateObject ... ' validate variables against database ...
    (microsoft.public.inetserver.asp.db)