Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Flexigrid with SQL

Posted on 2000-04-24
4
Medium Priority
?
195 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
ID: 2745555
Adjusted points from 50 to 75
0
 
LVL 6

Accepted Solution

by:
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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 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…
Suggested Courses

783 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