dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Runtime Error 6148 Invalid Row Number

  1. #1
    Join Date
    Jan 2002
    Posts
    1

    Runtime Error 6148 Invalid Row Number

    when run a database application whick uses datagrid control(vb6.0,service pack5),following code cann't run correctly,tell a error:6148 invalid row number.
    the code:
    [vbcode]
    for i=0 to datagrid.approxcount-1
    datagrid1.row=i
    .......
    next i
    [\vbcode]
    but if datagrid.approxcount<datagrid.visiblerows
    that mean not scrolling the datagrid,the code run
    correctly.why?and how to solve this problem?


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Runtime Error 6148 Invalid Row Number

    approxcount might not give the exact number of rows. That is where you are getting your error

    Iouri Boutchkine
    iouri@hotsheet.com
    Iouri Boutchkine
    iouri@hotsheet.NOSPAM.com

  3. #3
    Join Date
    Mar 2019
    Posts
    1

    Re: Runtime Error 6148 Invalid Row Number

    [QUOTE=Iouri;73555]approxcount might not give the exact number of rows. That is where you are getting your error

    Approxcount is giving the exact number but rowbookmark property is stopping after certain number.
    I am facing the exact problem but not able to figure out solution

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,009

    Re: Runtime Error 6148 Invalid Row Number

    Not a VB expert, but doesn't VB6 for loop indexing start at 1? If so, shouldn't the code be:
    Code:
    for i=1 to datagrid.approxcount
    datagrid1.row=i
    .......
    next i

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,408

    Re: Runtime Error 6148 Invalid Row Number

    [QUOTE=Ap Singh;2229059]
    Quote Originally Posted by Iouri View Post
    approxcount might not give the exact number of rows. That is where you are getting your error

    Approxcount is giving the exact number but rowbookmark property is stopping after certain number.
    I am facing the exact problem but not able to figure out solution
    Are you sure the OP still needs some help waiting 17 years for your reply?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)