Solved

Flexigrid with SQL

Posted on 2000-04-24
4
186 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
  • 2
  • 2
4 Comments
 

Author Comment

by:kurobei
Comment Utility
Adjusted points from 50 to 75
0
 
LVL 6

Accepted Solution

by:
Marine earned 75 total points
Comment Utility
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
Comment Utility

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

Expert Comment

by:Marine
Comment Utility
Thanks for the points. Happy Programming :-)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

728 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