Populate a datagrid in vb6 with values from a .dbf file

From: nupur_at_asterx.com ((nupur_at_asterx.com))
Date: 03/29/04


Date: Mon, 29 Mar 2004 15:39:07 -0800

Hi guys!
Ive never worked with dbase files before. So im having a bit of a worry populating the datagrid with records in the dbf file. here is my code..Im a access/sql person so im basically using the same technique to load the datagrid. Here's the code:

With ObjRS.Open
    DataGrid1.ColumnHeaders(2) = "xxxx"
    DataGrid1.Columns(0) = !Field1
    DataGrid1.Columns(1) = !Field2
    DataGrid1.Columns(2) = !Field3
End With

I have successfully made and opened a connection at this point and the values are in the recordset but i dont know how to access the recordset values so as to populate it in the datagrid in vb6!

Thanks for all the help...It WILL be appreciated!

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...



Relevant Pages

  • Re: Select query with parameters
    ... Dim rsPatient As ADODB.Recordset ... I am using the following code to populate the datagrid: ... When you Open a recordset you pass an SQL query statement as a string. ...
    (microsoft.public.vb.database.ado)
  • Re: DataGrid not showing programmatic changes
    ... It's been awhile since I've used the DataEnvironment... ... The DataGrid is usually bound to a Data control which in turn ... rsCashbook is a recordset of that Connection with a source of SELECT * FROM ...
    (microsoft.public.vb.general.discussion)
  • Re: MSHFlexGrid aktualisieren
    ... Das MSHFlexgrid hat keine permanente Verbindung zu Deinem Recordset. ... Das DataGrid verwaltet keinen eigenen ... auch automatisch der neue Datensatz zur aktuellen Zeile ... Private Sub Form_Load ...
    (microsoft.public.de.vb.datenbank)
  • Re: Need example of using ADO DataControl and DataGrid control - V
    ... Data appears in the DataGrid just fine. ... > ' Create connection string to access the database ... > ' Bind the recordset to the data grid. ... > Private Sub Command1_Click ...
    (microsoft.public.vb.database.ado)
  • Re: Große Listen mit Bildern
    ... > Einlesens der Daten ins Recordset wird dann in der Ereignisprozedur ... Auch habe ich keine Möglichkeit gefunden, Symbole in der Datagrid ... Mit Optimierung dauer es bei mir ca. 29 Sek. ...
    (microsoft.public.de.vb.datenbank)