Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 17th, 2007, 04:41 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recordset.recordcount = -1

I have a problem with VB Recordset.recordcount property
it always return (-1) here is my code:

Private Sub edit_cmd_Click()
    If rs.State = 0 Then
       rs.Open Sql, CN, adOpenKeyset
    Else
       rs.Close
       rs.Open Sql, CN, adOpenKeyset
    End If

    If rs.EOF Then
       MsgBox "The ID number is not found ..."
    ElseIf IDText.Text = "" Then
        MsgBox "Enter the ID number first ..."
    Else
        n = MsgBox("Are you sure you want to change it? ", vbOKCancel)
        If n = 1 Then
           CN.Execute "update Activ set ACTIV_TYPE = '" & TypeText.Text & "' where ACTIV_ID = '" & IDText.Text & "'"
        End If
    End If
End Sub






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help RecordCount jpaul Pro VB Databases 1 January 29th, 2008 01:46 PM
RecordCount dpkbahuguna Beginning VB 6 9 March 23rd, 2006 01:16 AM
RecordCount property doesn't work eapsokha Classic ASP Databases 6 February 10th, 2005 01:28 PM
RecordCount in DataGrid and Excel AyatKh ASP.NET 1.x and 2.0 Application Design 1 March 22nd, 2004 04:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.