VB Code:
Private Sub Command1_Click()
Dim intCounter As Integer
Set con = New Connection
con.Open "SQL_STSOP_DSN"
Set rec = con.Execute("SELECT * FROM ENGINEERS")
If Not rec.EOF Then
For intCounter = 0 To rec.Fields.Count - 1
Printer.Print rec.Fields(intCounter).Name & vbTab & rec.Fields(intCounter).Value
Next intCounter
End If
rec.Close
Set rec = Nothing
con.Close
Set con = Nothing
Printer.EndDoc
End Sub
This is using ado recordsets and connections...
The formatting and allignment of the data it prints out is a bit rough, but you get the general idea...
Hope this helps.