Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create a table of file from VB?

Status
Not open for further replies.

jforero

MIS
Oct 10, 2003
12
US
Hi, I want to create a table or file to save some information in it and then read this file using ADO object. Is there any way to do that from Visual Basic?

How would be the code to create the file, save information on it and read the file?

How the format of the file can be? (.csv, .txt or what)

Any help appreciated.

Thanks, Jose.
 
My initial thought (being unexperienced in this exact task) is to stick an empty Access database as a resource into your executable. At runtime, dump the resource to a file MyDB.mdb, connect to it with ADO, and start having fun.

CREATE TABLE...

You could use a DSN-less connection, or create a system or file DSN using Windows API routines.

But then, maybe there's a way to create a database with ADO thus letting you skip the first step I mentioned.
 
Project Menu | Add Form | VB DataForm Wizard and choose the ADO code option

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top