Solved

Grid not displaying all the records

Posted on 2002-04-02
9
196 Views
Last Modified: 2010-05-02
Hello,

I am using MSHFlexGrid to display some of my data from the database. Suppose I have 300 records in the recordset, the grid is displaying only 250 records. Is there any limitation on the No of records shown at one time for the MSHFlexGrid???? and How to overcome this problem????

Kirti
0
Comment
Question by:kirtirani
  • 4
  • 4
9 Comments
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6914825
There is no limit of rows to display in a MSHFlexGrid Control. You codes may got some problem..
0
 

Author Comment

by:kirtirani
ID: 6914846
Hi ryancys,

My code is ----> this code is written at the form load event......

Msql = "Select * from HelpDesk_SJC where IsDeleted = 0 order by problemno desc"
Set madors = Help_Cls.RunSQLReturnRS(Msql)
If madors.RecordCount = 0 Then
    MsgBox "No record exists for the clinic"
    Exit Sub
End If
Set FlexGrid1.DataSource = madors
madors.MoveFirst
FillValue


where madors is ADO Recordset, Fillvalue is a function to fill the Text Boxes, and FlexGrid1 is the MSHFlexGrid.
When I run this code, the madors.RecordCount gives me 271 but Grid only displays abt 245 records. Can you please help me????

Kirti
0
 

Author Comment

by:kirtirani
ID: 6914874
Hi ryancys,

My code is ----> this code is written at the form load event......

Msql = "Select * from HelpDesk_SJC where IsDeleted = 0 order by problemno desc"
Set madors = Help_Cls.RunSQLReturnRS(Msql)
If madors.RecordCount = 0 Then
    MsgBox "No record exists for the clinic"
    Exit Sub
End If
Set FlexGrid1.DataSource = madors
madors.MoveFirst
FillValue


where madors is ADO Recordset, Fillvalue is a function to fill the Text Boxes, and FlexGrid1 is the MSHFlexGrid.
When I run this code, the madors.RecordCount gives me 271 but Grid only displays abt 245 records. Can you please help me????

Kirti
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6915388
Please maintain your open questions.  For the record:

Questions Asked 12
Last 10 Grades Given B B B A C C B  
Question Grading Record 7 Answers Graded / 7 Answers Received

Anthony
0
 

Author Comment

by:kirtirani
ID: 6941201
Can anyone please answer my question????
I need it urgently.
Kirti
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6941214
If the database is small (zipped and < 1mb) and is Access , send me a copy with codes inside.

regards
0
 

Author Comment

by:kirtirani
ID: 6941275
Database is in Sqlserver. Code I have written earlier also. please see the code above and guide me.
Thanx
Kirti
0
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 6941285
Send the codes to ryancys78@yahoo.com, i will debug the code for you but try yourself first while waiting my reply.

regards
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6943620
Hi kirtirani,

Tested on my system:

Option Explicit
Dim myADO As New ADODB.Recordset
Private Const iConnectionString As String = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=myDB"
Private myConn As New ADODB.Connection

Private Sub Command1_Click()
    myConn.ConnectionString = iConnectionString
    myConn.Open
    myADO.Open "Select * from ProductLines ", myConn, adOpenKeyset, adLockOptimistic
    Set MSHFlexGrid1.DataSource = myADO
    MSHFlexGrid1.Refresh
    MsgBox myADO.RecordCount
End Sub

Everything just fine > display more than 5k records. So, i suspend what is wrong is your SQL statement.

What is the SQL statement you using? Make sure it's correct.

regards
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question