Re: Timing Rescordset
- From: hgeron <hgeron@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 2 Sep 2006 12:36:01 -0700
thanks, I reviewed your information, but I didn't understand most of it.
It seems like I could define a connection, open the connection and get the
records, and save the records in about 4 or 5 steps.
Access has a "import XML" feature, but it aways fails, and omits all except
one record in the most important tables. For example "P" node that contains
several attributes plus text, will only save one x,y,z coordinate. That's
why I had to "walk" through each node and get the attributes and node.text
one at a time. I don't know that if the problems lies in the way MSXML
retrives the node or the way LandXML defines their structure. But the only
way I have found that works is for me to get the nodes myself, and store them
into a table as I read them.
If you know how to save a file like...
http://www.landxml.org/LandXMLSamplesDemos.aspx
Autodesk sample :Hooksett.xml
Could you show me?
Harrell
--
hgeron
"Bob Barrows [MVP]" wrote:
I don't think I need to see your xml in order to describe how to create and.
use a saved parameter query. Start with this:
http://groups.google.com/group/microsoft.public.inetserver.asp.db/msg/7d6e8544e2fd6889?oe=UTF-8
To create tables, you have several options:
1. ADOX
http://msdn.microsoft.com/library/en-us/ado270/htm/admscadoddloverview.asp
2. JetSQL DDL (Data Definition Language) - see the section titled Microsoft
Jet SQL Reference in the Access online help
3. DAO - since you are doing this in a VBA module, this would probably be my
choice. I would not use ADO at all.
hgeron wrote:
thanks for the reply.
I would be intersted in your ideas.
I am using Access and I put the contents into Access tables.
The XML may contain many records, the largest I have done
so far was about 150,000 nodes. There are so many different
node names, and different attributes that I want to have a generic
procedure to read nodes, node.text, and attributes into one table,
then determine what table names I need and what goes into the tables.
I would like to create the tables as I parse the XML, but I don't know
how to do that.
If you need more info, just go to www.LandXML.org and review some
sample files.
HGeron
hgeron wrote:
Bob,
continued
The procedure was so time consuming, I decided to catch the data to
an array, and then record back to the table every 1000 lines of XML.
Since it was an array
I could deincrement the counter, and save the node.txt in the array.
This worked out to be much faster, and avoided the cancel update,
and
the move last. But this still bothers me...
(1) Why does it think that node_text is a new node?
Because it is. That's more af an XML question rather than an ADO
question ....
You would be better off testing the node type BEFORE adding data to
the recordset, wouldn't you?
(2) Why does the cancel update, then move last, seem to not give me
the
last record immediately, but if I put a wait, or several move last
commands, then I can be sure (usually) of getting the actual last
record.
No clue, beyond the possibility that you are running into the Jet
delayed-write behavior.
I wouldn't be using a recordset for this: I would be passing
parameters to a saved parameter query. Reply if you wish to consider
that approach and I'll give you some details.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
- Follow-Ups:
- Re: Timing Rescordset
- From: Bob Barrows [MVP]
- Re: Timing Rescordset
- References:
- Re: Timing Rescordset
- From: Bob Barrows [MVP]
- Re: Timing Rescordset
- From: hgeron
- Re: Timing Rescordset
- From: Bob Barrows [MVP]
- Re: Timing Rescordset
- Prev by Date: Re: Timing Rescordset
- Next by Date: Re: Timing Rescordset
- Previous by thread: Re: Timing Rescordset
- Next by thread: Re: Timing Rescordset
- Index(es):
Relevant Pages
|