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
Solved

Flexigrid with SQL

Posted on 2000-04-24
4
190 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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

809 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