export temp table to text file user side

P

Patrik

I have two problems with the following access/vba line :

DoCmd.RunSQL ("EXECUTE master..xp_cmdShell 'bcp
SEEPE.dbo.##Tbl_Temp_Stats out D:\Stats.txt -c -t'")

First this command only works if I mention a regular table and it
doesn't work with a temp table.
Second, even though I run the command in vba, it exports the text file
on SQL Server computer's hard drive.


I have also failed with this vba line :
DoCmd.TransferText acExportDelim, , "##Tbl_Temp_Stats",
"D:\statistique.txt", True


This last one is even better for me, but it errors saying the table
doesn't exist. (Works with regular table)

Thank you very much for your help.

NB I cannot use OutputTo EXCEL because the file will have more than 65
000 lines.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top