Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    LA, CA

    Angry Unanswered: Problem exporting from Access 2007 to csv file in networked environment?

    Ok... i am totally stumped. I created a database for a small business. They have a standard report they wanted to create as a csv. file which they later upload on a website for processing. No prob. I created it on my computer (no other computers networked in my house) and gave it to them. works perfectly every time for me.

    Problem when THEY export.

    At first i thought it's because it wasn't prompting them where to save the file and it may have been a bit of a glitch in a networked environment. Ok, so I did my due diligence and searched through threads to see if anyone had any info. I did find the data in the code bank for creating a form to designate where the file is saved. Super... still works for me.

    Not super for THEM....

    so.... here's the deal. When THEY export, they get two files. One that has no data and has the designated file name... and the other that just says "export file" and lists the specs of the csv file (column names, etc).

    Does anyone have ANY idea what the heck is going on? I am ready to rip my hair out.


  2. #2
    Join Date
    Oct 2009
    well - double check that they can export, like you, onto their C: - - - and take all the networking out of it..... until you get this working there is no sense in going further....

    then check that their destination on the network is within the db's trust center...that's just a guess...

  3. #3
    Join Date
    Dec 2004
    Madison, WI
    My guess is there might be an MDAC installation problem on the network drive or on the user's workstation. What you described sounded like it was actually exporting as an xml format (which typically breaks it into 2 files, one the data, the other the schema file.) If the MDAC is messed up on the network/workstation, it may lead to problems in code where you're trying to export as a specific file format. That's the only thing I could think of which would cause the splitting where it doesn't for you. Either that or your exporting routine/command parameters are setup incorrectly and it's defaulting to csv on yours and xml on the network.

    Here's what you can check (on the network):
    1. Open Control Panel
    2. Click Administrative Tools.
    3. Click Data Sources (ODBC)
    4. Click the "Drivers" tab.
    5. Make sure there is a Microsoft *.csv/*.txt driver. If not, re-install MDAC (you can download the latest version from the Microsoft website for free.)

    1. (on a problem user's computer/connection)...Open the mdb on the network and highlight any table.
    2. Select File -> Export.
    3. Change the File Type to *.csv or *.txt and try it manually. If *.csv/*.txt is not an option, re-install MDAC.
    4. If it is an option and the export still separates it into 2 files, again, re-install MDAC.
    5. If the *.csv export works fine manually then double-check your exporting code to make sure it's perhaps not using a default of *.csv on your system and your exporting code isn't configured correctly/using the wrong default and the network is trying to do it as an xml format (double-check your export command parameters.) See the exporting example in the link below - it uses the simple domcd.transfertext command.

    If you're interested, see this method which works nicely for my network users when they need to view/export a specific query(s):

    I use it for all my queries which the user wants to view and then export to a file. The browse (to prompt the user for the folder to save to) works very nicely and there's really no changes to the coding you'd need to change to use it (it's just a simple export routine and form with a query name (versus a form name) as the sub form.) There are a couple of modules you'd need to import from the example if you'd want to utilize the browse function of the exporting. These are standard type modules found in the Sybex MSAccess handbook which have never given me a problem regardless of Access version/network setup.

    For the query as the subform, you open the form and set the subform to the query name (ie. =query.MyQuerName) - it's just a neat little trick I discovered with subforms. The nice thing about this is the subform then gives you an excel type navigation of the query and there's NO special or other coding. Works especially nice for crosstab type queries since the user can also utilize the horizontal scroll within the subform.
    Last edited by pkstormy; 11-06-09 at 22:21.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts