Jim DeMarco
Jdemarco at hudsonhealthplan.org
Mon Nov 29 08:44:22 CST 2004
Eric, I did a quick test of a little sample db and had the same result trying to match a category name using LIKE, BUT I noticed that if I change the query to use the Category ID rather than LIKE on the name column I returned results in the XML file. FWIW Jim DeMarco -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Eric Goetz Sent: Saturday, November 27, 2004 9:05 PM To: Access Developers discussion and problem solving Subject: [AccessD] ExportXML fails calulated where in acc2003? Hi, I thought I'd incorporate a little XML in transferring data from an Access 2003 mdb to an Excel spreadsheet. The Excel XML List looks like a useful feature. The trouble is, I can't get Access to output the XML. I'm running Access 2003 as part of a complete install of Office 2003 Enterprise Edition with SP1. I've tried this on two machines: XPProSP1a and XPProSP2. I've wasted my day isolating a test case, and here it is... Test A, make sure you can do a simple export to XML. 1. Take a fresh copy of Northwind.mdb 2. Right click on the query called "Alphabetical List of Products" and select "Export..." 3. Use the combobox "Save as type:" to select XML. 4. Click "Export" 5. Take the defaults on the subsequent dialogs. 6. Open the ".xml" file that you just created. 7. WOW! You now know how to use XML! Test B, actually try to use XML to do some work. 1. Open the query "Alphabetical List of Products" in design view. 2. Add criteria to "CatagoryName" of Like "S*", which gives SQL of: SELECT Products.*, Categories.CategoryName FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID WHERE (((Categories.CategoryName) Like "S*") AND (Products.Discontinued)=No)); 3. Run the query to see that you get the 12 products from the Seafood category. 4. Save the query. 5. Perform steps 2 through 6 from Test A. 6. I get a nearly empty file. HUH? I thought I knew how to use XML. How about you? It seems that just about any calculation in the WHERE clause kills ExportXML. I've tried it from VBA as well as the manual method employed above. Thanks, Eric -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". ***********************************************************************************