I know this has been answered many times but can't find the exact answer I am looking forward. I am connecting to a database from which I want to lean how to use SQL statements in VB6. I want to be able to select records and then output them in a text file (or screen if desired). Once I execute the SQL SELECT * FROM database name WHERE ... how do I get just those records to the text file or screen and not the whole database. Can someone give me some sample code?