473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Application.ImportXML 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.ImportXML _
DataSource:="C:\XMLData\Invoices.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.ImportXML [MyXMLFile], acStructureAndData

(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.Import 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_Click()
Dim strInputFileName As Variant

strInputFileName = FileOpenSave(True)

If Len(strInputFileName) > 0 Then
MyXMLFileTxt = strInputFileName
MyXMLFile = strInputFileName
End If

End Sub
__________________________________________________ _________________

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

strFilter = acbAddFilterItem(strFilter, "XML Files (*.xml)",
"*.XML")

FileOpenSave = acbCommonFileOpenSave(Filter:=strFilter, _
InitialDir:="\\B3\CDW\Information Solutions\2 -
Documentation\DocuVisn\Corporate Data Warehouse")

OK_Button.Visible = 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.ImportXML [MyXMLFile], acStructureAndData

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 2591

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

Similar topics

6
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...
1
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...
10
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...
6
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. ...
4
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...
4
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...
1
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...
7
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: ...
15
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. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.