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

Unable to Export to Comma Delimited, "Invalid Argument"

Status
Not open for further replies.

CptCrusty1

Programmer
Feb 17, 2005
216
US
I'm trying to export 350K records in 3 fields to a *.txt file. When I tell the "wizard" to finish, it says "Invalid Argument" with an OK. When I click the OK it says...:


"An error occurred trying to export data from table 'Grace Days'. The data was not exported."

I have another table in the same database with only 8k records, and I get the exact same error.

When I go to another database and export 229k records to a txt file, I get no problems and no errors.

Any idea why this one won't let me? Oh.. I already did a compact and repair. db is now 50mb.

Thanks.
Rich.
 
this is a shot in the dark, but perhaps you have something in a field that is the same character as a delimiter. During the export wizard, try changing the delimitors, like change " to |. See if that works, or try another format, other than txt, see if you still error out.

_______________
[cN]
 
TWANG!!!! [red]------->|[/red] THUNK! Thats the sound a "shot in the dark" makes. I'll give it a SHOT... and shee what happensh!!!

Thansksh!!
 
DeMann,

I have tried EVERYTHING!!! It WILL not export into a text format. I can export straight to XLS or HTML, other format. I've tried eliminating fields to see if I can narrow it down that way, but no luck! I've tried changing the format of the various fields to see if I can make it work that way and also no luck.... .

[red]WHAT AM I DOING WRONG!!!!!??????[/red]

Help Me Obi Wan, you're my only hope!!!!
 
Sorry I can't be of more help.

I just reread your post, and you basically tried everything that I was going to suggest. The only time I have ever experienced anything similar was when I had the last field as a number or a date or a boolean. Basically, any type that doesn't use quotes to delineate data. If that was the last field in a line and it was empty, it would have trouble exporting it correctly. What I would have to do is split the fields up, and performing several exports, but it sounds like you did something similar to that.

I still say that it has to do with your data, either it's having a hard time reading that empty field, or something, it has to be something. Maybe you can play around with exporting smaller data sets, to see if there is indeed a bad record somewhere that is throwing everything off. Like maybe 100k at a time, then 50k, etc.

I'm sorry, I feel bad :(

_______________
[cN]
 
Here's an interesting tid-bit on the export. I tried doing the same thing using a Macro. It also just so happened that I had the stupid little paper-clip dude sitting on the desk top. Lo- and Behold! I got an error message that said I can only hold a maximum of 65000 records in memory at one time, yadda yadda.

Interestingly enough, that doesn't apply to an HTML format. I deleted enough records that I had 65k (actually a little less, I got a little happy) and tried again and [red]WHAMMO![/RED] it worked [thumbsup]. But now the formatting is really dorky[thumbsdown]. It creates lines and boxes in the txt format to make it appear more like a spreadsheet/table. The rtf format is garbage all together for this attempt.... I think I'm going to have to keep digging...... If you can think of anything else.... please tell...

Thanks
Rich.
 
OK... I found it. The problem is that Access doesn't like to export numbers in Decimal format. I changed the format within the query to Cdbl(Loan_Num) which sets the format to a double, i.e., no longer a Decimal, it exported with no problem... Weird huh?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top