Solved

Flexigrid with SQL

Posted on 2000-04-24
4
193 Views
Last Modified: 2013-12-26
How can I add all the registers resulting from a SQL to a Flexgrid?
0
Comment
Question by:kurobei
[X]
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
4 Comments
 

Author Comment

by:kurobei
ID: 2745555
Adjusted points from 50 to 75
0
 
LVL 6

Accepted Solution

by:
Marine earned 75 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
rs2.MoveNext
grid.Rows = rs2.RecordCount + 1
i = 0
rs2.MoveFirst
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
             rs2.MoveNext
Loop
0
 

Author Comment

by:kurobei
ID: 2745998

A fast and useful answer. Thank you very much.
0
 
LVL 6

Expert Comment

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

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month7 days, 13 hours left to enroll

632 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