Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Flexigrid with SQL

Posted on 2000-04-24
Medium Priority
Last Modified: 2013-12-26
How can I add all the registers resulting from a SQL to a Flexgrid?
Question by:kurobei
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Author Comment

ID: 2745555
Adjusted points from 50 to 75

Accepted Solution

Marine earned 300 total points
ID: 2745724
I am sorry i don't quite understand the question. Do you want to add data taken from query and place it into a FlexGrid ? If so this will work. If not please explain me your question again. Thanks.

Grid is FlexGrid
I first populate The headings and the populuate the data.

Dim i As Integer, j As Integer

grid.Cols = rs2.Fields.Count
grid.Row = 0
j = -1
For Each fld In rs2.Fields
     j = j + 1
      grid.TextMatrix(0, j) = fld.Name
Next fld
grid.Rows = rs2.RecordCount + 1
i = 0
Do Until rs2.EOF
         i = i + 1
         grid.Row = i
          j = -1
            For Each fld In rs2.Fields
                j = j + 1
             grid.TextMatrix(i, j) = fld
             Next fld

Author Comment

ID: 2745998

A fast and useful answer. Thank you very much.

Expert Comment

ID: 2746003
Thanks for the points. Happy Programming :-)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

705 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