Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 6th, 2006, 11:31 AM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errors exporting to .dbf

I am trying to use access to union two .dbf (dBASE IV) into a larger .dbf.

I've done this before, and it usually works fine. This time however, it doesn't work. When I tell it to export and then pick a file name, it says it can't find the file name I chose (it should be making it). I've tried changing the file name to C:\test.dbf which should be small enough. I've also noticed that I can do all sorts of other thing in the SQL like reorder the columns or add columns and they export fine. It's only when I try to union them that I get this error. This is what my query looks like:

SELECT *
FROM wfa

UNION ALL SELECT *
FROM wfb

Has someone seen this error before? It's driving me crazy! Is there another program that I could do this with easily that doesn't cost an arm and a leg?

BTW, I've used Access 2000, and 2003.

  #2 (permalink)  
Old June 6th, 2006, 11:45 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I am no expert at this by any means, but for lack of a better solution, why not create the union in Access and export it to an Access table, then export that table out to the DBF file.

Mike
EchoVue.com
  #3 (permalink)  
Old June 6th, 2006, 12:27 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well... I've tried to export it to other formats. That sounds like a solution, but how do I export it to a table? I tried using the .mdb export, but it only exports the query as a query and not a table.

Thanks for your post.

  #4 (permalink)  
Old June 6th, 2006, 12:38 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

When you go into your query, click on the query menu up top and choose "Make Table Query" then enter the name of a new table, and then when you run it, it'll create that table from the query, then just export that table to the DBF.

Mike
EchoVue.com
  #5 (permalink)  
Old June 6th, 2006, 01:31 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks to your help, and a little tweaking, that worked.

I don't like wizards, so I went into the SQL instead and saw that the "Make Table Query" just added the "SELECT ... INTO ..." I couldn't figure out how to use this with the UNION, but I did get it to work by using the SELECT INTO and then create a separate append query that used INSERT INTO to concatenate the databases. Then I was able to export them to dbf. Thanks for your help.



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL to DBF gokul_blr SQL Server DTS 3 May 16th, 2006 01:04 AM
Exporting Oracle Table to .dbf (FoxPro 2.6) File syamchandr Oracle ASP 2 December 12th, 2005 04:43 AM
Can't get errors to display with <html:errors> michaeldill JSP Basics 0 August 2nd, 2004 01:47 PM
Errors Errors DB Errors Ljhopkins VS.NET 2002/2003 0 July 15th, 2003 12:42 PM
DBF Database phil_kenney VB Databases Basics 0 June 16th, 2003 12:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.