473,778 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application.Imp ortXML Fatal Error; Causes? Way Around?

All -

2 questions, the answer to either one having the possibility of making
the other a moot point:

1. I have a DB with a form that serves as a GUI to let the user browse
for an XML file and import it, and I can't get Access to overwrite the
tables when it finds them in existence. Can anyone tell me how to make
this happen? I can't get the "OtherFlags :=1" option to work -

I've even tried using just the code from MSDN, but I can't even get
this to work;

Application.Imp ortXML _
DataSource:="C: \XMLData\Invoic es.xml", _
OtherFlags:=1

Whenever I try to run or compile it, Access shows the error "Named
argument not found." Here's the line I'm currently using, without
the option:

Application.Imp ortXML [MyXMLFile], acStructureAndD ata

(Full code below to explain [MyXMLFile])

Am I missing something? If I should be "naming " (Dimming?)
OtherFlags, how? Any one know what the finished line should look like?
I've tried many, many variations.
2. I can use the form successfully a few times (deleting the tables
manually), until maybe the 4th or 5th time I try the process, and
Access crashes and rebuilds the DB. Then the form won't work any more,
unless I create a new DB and import all my forms, modules, etc. Any
ideas why?

I don't know if this is because I have to delete the newly created
tables manually...but I'm trying to eliminate all possible sources of
"corruption ."

Here's the full code I'm using, built from several sources. I've
included more than just the Application.Imp ort line because I'm using a
control to get [MyXMLFile], the name of the XML file.
_______________ _______________ _______________ _______________ _______

Option Explicit

Dim MyXMLFile As String
_______________ _______________ _______________ _______________ _______

Private Sub Select_Button_C lick()
Dim strInputFileNam e As Variant

strInputFileNam e = FileOpenSave(Tr ue)

If Len(strInputFil eName) > 0 Then
MyXMLFileTxt = strInputFileNam e
MyXMLFile = strInputFileNam e
End If

End Sub
_______________ _______________ _______________ _______________ _______

Private Function FileOpenSave(fO pen As Integer) As Variant
Dim ofn As tagOPENFILENAME
Dim strFilter As String
Dim lngFlags As Long

strFilter = acbAddFilterIte m(strFilter, "XML Files (*.xml)",
"*.XML")

FileOpenSave = acbCommonFileOp enSave(Filter:= strFilter, _
InitialDir:="\\ B3\CDW\Informat ion Solutions\2 -
Documentation\D ocuVisn\Corpora te Data Warehouse")

OK_Button.Visib le = True
End Function
_______________ _______________ _______________ _______________ _______

Private Sub OK_Button_Click ()

If IsNull([MyXMLFile]) Then
Beep
MsgBox "Please click the 'Select...' button to browse to a
DocuVisn XML file.", 64, "Completion Message"

Else
DoCmd.Hourglass True
DoCmd.Echo True, "Now Importing DocuVisn XML File...Please
Wait"

'Import Stuff

Application.Imp ortXML [MyXMLFile], acStructureAndD ata

DoCmd.Echo True
DoCmd.Hourglass False

Beep

MsgBox "The XML file has been successfully imported. Now open
'CDW Reports Data Entry' and complete the Report Verification ", 64,
"Completion Message"

DoCmd.Close acForm, "FRM_Import_DV_ XML"

End If

End Sub

_______________ _______________ _______________ _______________ _______

I'd rather not create/delete/create/delete over and over again, because
I think it may be what's causing problems with the stability of my
DB. Not sure if this is the case - maybe someone knows of or can
spot something else that could be causing the problem.

Thanks.

Patrick

Nov 13 '05 #1
0 2615

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
16647
by: o'seally | last post by:
solaris/linux admins/rookie_developers that battle with this error are probably all frustrated when it happens. i bet you're also somehow frustrated by this seemingly unsolvable error :-) ...take it easy, it'll go away once u've learned how to play around with a few things on your system and reorganised. i'm particulary a solaris junkie, but linux is my admiration. the issue here is Not the OS/Software, but rather the concept. first of all...
1
2304
by: Erik Sørensen | last post by:
When I try to compile something in Dev-C++ 4.9.9.0 i get a fatal error reading " 'all-before' does not exist - don't know how to make it " I am not a programming expert, and I have not been able to figure out what causes this error, or how to fix it. Does anyone have an idea on how to get rid of this error? Erik.
10
3286
by: PufferFish | last post by:
Hi folks, I hope that this is the correct group for these things, apologies if not. I've got a strange compiler error. It appears to be similar to the issue described in knowledgebase article 320004 except that particular problem was
6
5209
by: Steve Crawford | last post by:
I've started seeing the following in my logs: FATAL: invalid frontend message type 8 I searched back over a month and there are 5 instances of this error of which 4 are in the last 24 hours. I could not find this error defined. Any ideas of what it means, it's severity, how to track the cause and cure? Cheers,
4
5650
by: ARF | last post by:
I'm testing AutoCAD 2005 automation via VS2005 Pro C++/CLR and I'm getting fatal compiler errors. I start with a default C++/CLR class library project and modify it by adding the following references: acdbmgd.dll acmgd.dll the entire source for the default library header file is:
4
2124
by: nepifanio | last post by:
Hi Guys, I'm trying to import data out of MySQL db to MS Access 2003 using ImportXML. I don't have any problems doing the import, except for one table with a "text" field defined. I'm getting an error message saying "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.". Thanks,
1
1585
by: Simon Kittle | last post by:
Hi, Is it possible in PHP to provide a nice pretty page when a fatal error occurs? (Or any of the errors listed here http://uk.php.net/manual/en/function.set-error-handler.php which you cannot catch). I have error_reporting turned off as I have a production server - but that just gives a blank page which is less than good.
7
2598
by: Daniel | last post by:
Hello! I am having a problem with a windows application that abnormally terminates itself. The application is a multi threaded .NET 1.1 application, and can briefly be described as follows: Call the thread running the GUI "A". When user clicks a button a new thread "B" is created and started. "B" does a lots of work, among others transmitts data via a USB-CAN-interface. At the end of "B" a paper label is printed using methods provided...
15
2631
by: (PeteCresswell) | last post by:
Some time within the next nine months, there's a pretty good chance I'll have the "opportunity" to port a bond trading system that I wrote - whose front end is currently MS Access - to .NET. Quotes bc I need this like I need another hole in the head. But in the words of one of my esteemed colleagues: "I don't sell programming; I sell happiness." And if this will make my clients happy, that's what floats my boat in the long run.
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10292
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.