Solved

Grid not displaying all the records

Posted on 2002-04-02
9
194 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 49

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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

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

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 49

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 49

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now