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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Dynamic Table to Text-Tab

Status
Not open for further replies.

slowmike

Programmer
Nov 4, 2003
16
0
0
US
I'm trying to export a number of tables with a variable number of fields and field names to a tab-delimited text file using VB code. If I use the TransferText method, I can only export to a comma-delimited text file if I do not have an export spec. I tried to create an export spec on the fly by inserting records into the MSysIMEXSpecs and MSysIMEXColumns tables, but I get an error if I try to make these tables not read-only. Any ideas?
 
Just an idea - I had to do sort of the same thing one time:
Create a string from your output data concatenating the tab characters as necessary between the fields. Then, just output the string to the file.
The string you output will contain all your fields along with the tab separation characters.
The ascii character for tab is chr(9). If the string is more than 255 chacactes long, you'll need to split up the string in your output.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top