Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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.

Reply With Quote
  #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
Reply With Quote
  #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.

Reply With Quote
  #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
Reply With Quote
  #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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.