|
| Hi All,
i am sorry for the repost but I am getting quite desperate for a solution
and I ony recieved a partial reply last time.
I have used some of script that was posted on this
site to import XML into SQL using some VB Script in a DTS package, sorry
about the long description there, but for some reason I am unable to make it
work, I am trying to get a selection of information out of one tag but the
DTS says it has completed but nothing is there, I think it has something to
do with the way that the XML file is stuctured :- the xml files looks like
<?xml version="1.0"?>
<Inspection xmlns:xsd="http://www.www.org/2001/XMLSchema"
xmlns:xsi="http://www.www.org/2001/XMLSchema-instance">
<FileName>S:\Schools data\MEG\280480.XML</FileName>
<InstitutionType>School</InstitutionType>
<InstitutionName>West Street</InstitutionName>
<InstitutionNumber>119174</InstitutionNumber>
<InspectionNumber>280480</InspectionNumber>
<Date>31/10/2005</Date>
<IndependentSchool>false</IndependentSchool>
<InspectionType>S5</InspectionType>
<Inspectors>
<OIN>29504</OIN>
<Name>Shirley Herring</Name>
<LeadInspector>true</LeadInspector>
<AssistantInspector>false</AssistantInspector>
</Inspectors>
<SchoolEfs>
<InspectorOin>29504 - Shirley</InspectorOin>
<ObservationTime>30</ObservationTime>
<EfType>L</EfType>
<YearGroups>3</YearGroups>
<YearGroups>4</YearGroups>
<YearGroups />
<YearGroups />
<GroupingAbility>MC</GroupingAbility>
<GroupingGender>MI</GroupingGender>
<Present>24</Present>
<Nor>27</Nor>
<SubjectCode1>MU</SubjectCode1>
<SubjectCode2>LY</SubjectCode2>
<SenSupportCount>0</SenSupportCount>
<SenAssistantCount>1</SenAssistantCount>
<EalSupportCount>0</EalSupportCount>
<EalAssistantCount>0</EalAssistantCount>
<OthSupportCount>0</OthSupportCount>
<OthAssistantCount>0</OthAssistantCount>
<InspInitialWithEf>SH29</InspInitialWithEf>
<Focus />
<Context />
<Evaluation />
<Summary />
<Overall>2</Overall>
<Standards>3</Standards>
<Progress>2</Progress>
<PersonalDev>2</PersonalDev>
<Teaching>2</Teaching>
<Curriculum>2</Curriculum>
<Care>0</Care>
<Leadership>0</Leadership>
<CsiEval />
</SchoolEfs>
<SchoolKsYg xsi:type="xsd:string">Key Stage F</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Key Stage 1</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Key Stage 2</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group N</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group R</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group 1</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group 2</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group 3</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group 4</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group 5</SchoolKsYg>
<SchoolKsYg xsi:type="xsd:string">Year Group 6</SchoolKsYg>
<InspectionReport>
<TransformedXml><?xml version="1.0" encoding="utf-16"?>
<InspectionReport
xmlns="http://www.govtalk.gov.uk/education/InspectionReport-200508"
xmlns:apd="http://www.govtalk.gov.uk/people/ AddressAndPersonalDe
tails"
xmlns:core="http://www.govtalk.gov.uk/core"
xmlns:pdt="http://www.govtalk.gov.uk/people/PersonDescriptives">
<InspectionKeyData>
<InspectionNumber>280480</InspectionNumber>
< InspectionBeginningD
ate>2005-10-31</ InspectionBeginningD
ate>
<InspectionEndDate>2005-11-01</InspectionEndDate>
<ReportingInspector>
<InspectorName>Shirley Herring</InspectorName>
<InspectorStatus />
</ReportingInspector>
<InspectionCategory />
< DateOfPreviousInspec
tion>1900-01-01</ DateOfPreviousInspec
tion>
</InspectionKeyData>
<InspectionSetting>
<SettingName>West Street Community Primary School </SettingName>
<SettingAddress>
<apd:Line>West Street</apd:Line>
<apd:Line>Colne</apd:Line>
<apd:Line>Lancashire</apd:Line>
<apd:Line>BB8 0HW</apd:Line>
</SettingAddress>
<TelephoneNumber>01282 865840</TelephoneNumber>
<FaxNumber>01282 863542</FaxNumber>
<School>
< UniqueReferenceNumbe
r>119174</ UniqueReferenceNumbe
r>
<LEAName>Lancashire</LEAName>
<TypeOfSchool>primary</TypeOfSchool>
<SchoolCategory>community</SchoolCategory>
<PupilLowAge>3</PupilLowAge>
<PupilHighAge>11</PupilHighAge>
<PupilGender>mixed</PupilGender>
<NumberOnRoll>190</NumberOnRoll>
< AppropriateAuthority
>The governing body</ AppropriateAuthority
>
<ChairOfGovernors>Ann Scarborough</ChairOfGovernors>
<Headteacher>Mr Ron Peden</Headteacher>
</School>
</InspectionSetting>
<ReportBody>
<Introduction>
<Preamble>
<Paragraph>The inspection was carried out by two additional
inspectors.</Paragraph>
</Preamble>
< DescriptionOfSetting
>
<Paragraph>West Street Community Primary School is a slightly
smaller than average primary school in the centre of Colne. It serves an area
of high social deprivation. The proportion of pupils who are entitled to free
school meals is one of the highest in the country. Many children enter the
nursery with skills that are well below what is normally expected for their
age. </Paragraph>
<Paragraph>The majority of pupils are from a white British
background but almost a fifth of pupils are of Pakistani heritage.
Approximately half of the children have learning difficulties and a higher
number than average have statements of special need. The number of children
for whom English is an additional language is above average. </Paragraph>
</ DescriptionOfSetting
>
</Introduction>
< OverallEffectiveness
>
<FormalStatement>Inspectors agree with the school’s own judgement that
West Street is a good school. Pupils achieve well because the teaching is
good. Provision for children in the nursery and reception is good and the
children make a good start to school life. The care of the pupils is
outstanding and their personal development is good. Pupils enjoy school; they
behave well, develop good attitudes to learning and feel safe. Very good
links with local partners have contributed very well to what the school
provides. The leadership and management are good and the high aspirations of
the headteacher and the deputy for their pupils have led to good improvement
in standards over the past three years. The school knows its strengths and
matters for improvement well. It has accurately identified the need to
improve the pupils’ writing and the need to make better use of assessment
data to track the progress of individual pupils. The school has a good
capacity to continue to make the further improvements needed. The school
provides good value for money.</FormalStatement>
<List>
<Item>
</Item>
</List>
<Paragraph>not applicable</Paragraph>
<ToImproveFurther>
<List>
<Item>Make better use of assessment to monitor the progress of
individual pupils and to set work at the right level.</Item>
</List>
<Paragraph> </Paragraph>
<List>
<Item>Raise standards in writing, expecting pupils to produce
longer pieces of written work in English and other subjects. </Item>
</List>
</ToImproveFurther>
</ OverallEffectiveness
>
< AchievementAndStanda
rds>
<Paragraph>Pupils achieve well. The school has received achievement
awards in recognition of its success for each of the past two years. Children
enter the nursery with attainment well below what is usual for their age,
particularly in speaking and listening. Despite good overall progress in the
foundation unit, many children do not reach the recommended goals by the time
they are ready for Year 1. However, with consistently good teaching in the
infants children continue to make good progress and, by the end of Year 2,
they reach standards that are approaching average for their age in all the
main subjects.</Paragraph>
<Paragraph>Pupils continue to make good progress through the juniors
and reach average standards by the end of Year 6, as shown in the results of
national tests for the last two years. The mathematics and science results in
2004 were in line with national averages. Although pupils’ progress in 2004
placed the school in the top 1% for improvement in English and mathematics in
the country, standards in writing are below average and could be better
still. This is because the pupils are not given enough opportunity to write
at length in all subjects.</Paragraph>
<Paragraph>Almost half of the pupils in the current Year 6 have
learning difficulties. The systematic teaching and effective support is
helping all pupils to achieve well in relation to their capabilities. Good
bilingual support also enables pupils who are at an early stage of learning
English to achieve well.</Paragraph>
</ AchievementAndStanda
rds>
<PersonalDevelopment>
<Paragraph>Pupils’ personal development is good. Parents see the
school as one where all children and adults are valued. Pupils behave well;
they enjoy school, work hard and are well mannered and polite. Attendance is
satisfactory. Pupils enjoy sport and understand that it helps to keep them
healthy. The school’s links with Sure Start have provided important support
from the oral health team, resulting in an improvement in children’s dental
health. The pupils’ spiritual, moral, social and cultural development is
good. The pupils’ views are valued and the school’s ‘ideas for improvement’
box allows them to express their concerns. Pupils willingly accept
responsibility and raise funds for charities, for example, for the victims of
the south-east Asian Tsunami. The school council members are newly appointed
this term and are keen to represent their classmates. The school is a
friendly place where pupils feel safe. Older pupils are mature young people
who talk confidently to adults. They are enthusiastic about their supervision
of other children; for example, to make playtimes safer and more
enjoyable.</Paragraph><Paragraph>Grade: 2</Paragraph>
</PersonalDevelopment>
<QualityOfProvision>
<TeachingAndLearning><Paragraph>Teaching and learning are good
throughout the school, including the Foundation Stage. Most lessons include
challenging activities and active questioning, which hold pupils’ attention
and keep them engaged in learning.</Paragraph><Paragraph>In Years 1 to 6, a
variety of well planned, practical activities, especially in mathematics,
make learning enjoyable and ensure that new work is fully understood.
Occasionally, the pace of literacy lessons is too slow and pupils become a
little restless when they are expected to spend too long listening to the
teacher rather than starting their own tasks. Work in pupils’ books shows
that teaching is systematic and thorough. However, although basic writing
skills are taught well, pupils are not asked often enough to write
independently and at length.</Paragraph><Paragraph>Teaching assistants play
an important role, willingly sharing their considerable skills and giving
effective help to pupils with learning difficulties. The regular involvement
of the headteacher and deputy head in teaching mathematics and science has
been a key factor in improving the overall quality of
teaching.</Paragraph><Paragraph>Assessment in English and mathematics
provides class teachers with a clear picture of their pupils’ current
progress, which enables them to target help where it is needed. However, the
information is not used to track the progress of individuals through the
school. Pupils appreciate teachers’ written comments on their work but do not
have individual targets to help them to take more responsibility for their
own learning. Assessment in other subjects is less effective than in English
and mathematics. In a number of lessons, the tasks were too hard for some
pupils and too easy for others. The school is planning to improve its
assessment where necessary so that it informs teachers about the specific
needs of individual pupils.</Paragraph><Paragraph>Grade: 2</Paragraph>
</TeachingAndLearning>
< CurriculumAndOtherAc
tivities>
<Paragraph>The curriculum is good and meets the needs of all pupils.
In the Foundation Stage, children learn through play in a stimulating
environment where each child’s needs and progress are carefully planned for
and met. The curriculum throughout Years 1 to 6 is enriched by a wide range
of visits and by visitors to the school who help to make learning more
relevant and interesting. The school is working to raise standards by
increasing opportunities to support pupils’ personal and social development,
and by paying more attention to a creative and physical curriculum in order
to improve pupils’ motivation. The range of extra-curricular activities is
broad and a large number of pupils eagerly participate in physical pursuits,
such as cross-country running.</Paragraph>
<List>
<Item>Grade: 2</Item>
</List>
</ CurriculumAndOtherAc
tivities>
< CareGuidanceAndSuppo
rt>
<Paragraph>This aspect of the school’s work is outstanding and makes
a significant difference to children’s lives. The school has a welcoming,
family ethos. The senior staff liaise closely with a range of service
providers to ensure the care and support of vulnerable children and the
effectiveness of the school’s child protection procedures. Parents are quick
to praise the school for this work, and the vast majority of the pupils
believe they are well cared for. When asked what is best about their school,
they replied, ‘how the teachers look after you’. The quality of relationships
is excellent and contributes significantly to the well-being of
pupils.</Paragraph><Paragraph>The school makes every effort to remove risks
and eliminate dangers in all aspects of learning. From the outset, pupils are
made aware of the importance of safety. Outdoors, during play and lunchtimes,
good supervision and safety procedures ensure that all pupils are safe. A
well attended breakfast club gives a good start to the day for many pupils
and encourages improved attendance.</Paragraph><List><Item>Grade:
2</Item></List>
</ CareGuidanceAndSuppo
rt>
</QualityOfProvision>
< LeadershipAndManagem
ent>
<Paragraph>The good leadership of the headteacher and deputy
headteacher, based on a clear and accurate evaluation of the school’s work,
has been the crucial factor in improving the school. The senior staff ‘lead
from the front’ in their own teaching, especially in their work as
mathematics and science coordinators. The management role of other subject
coordinators is satisfactory but improving. The senior staff have fostered a
strong sense of teamwork and mutual respect that is reflected in the
outstanding care shown to all pupils. Parents’ views are sought and valued
and parents acknowledge the good leadership through their responses to
questionnaires.</Paragraph><Paragraph>The school has made a good improvement
in standards in the main subjects and information and communication
technology (ICT) since the last inspection and it is clear from this that the
school has a good capacity to improve further. Provision for pupils with
learning difficulties and for pupils learning English as an additional
language is managed well.</Paragraph><Paragraph>Governance is satisfactory
and financial management is good. Governors are supportive of the school but
they are not sufficiently aware of its strengths and weaknesses to be able to
hold the professionals to account and therefore contribute to the school’s
improvement. However, they are now taking steps to become more closely
involved in the school’s work.</Paragraph><List><Item>Grade: 2</Item></List>
</ LeadershipAndManagem
ent>
</ReportBody>
< InspectionJudgements
>
< JudgeOverallEffectiv
eness>
<MeetingNeeds>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</MeetingNeeds>
<PartnershipWorking>
<SchoolGrade>1</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</PartnershipWorking>
<QualityFoundation>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</QualityFoundation>
<SelfEvaluation>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</SelfEvaluation>
<ImprovementCapacity>
<SchoolYesNo>yes</SchoolYesNo>
<SixthFormYesNo>key stage not present</SixthFormYesNo>
</ImprovementCapacity>
<EffectiveSteps>
<SchoolYesNo>yes</SchoolYesNo>
<SixthFormYesNo>key stage not present</SixthFormYesNo>
</EffectiveSteps>
</ JudgeOverallEffectiv
eness>
< JudgeAchievementAndS
tandards>
<LearnersAchieve>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</LearnersAchieve>
<StandardsReached>
<SchoolGrade>3</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</StandardsReached>
<ProgressMade>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ProgressMade>
< DifficultyDisability
>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ DifficultyDisability
>
</ JudgeAchievementAndS
tandards>
< JudgePersonalDevelop
ment>
<OverallPersonal>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</OverallPersonal>
<SpiritualCultural>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</SpiritualCultural>
<Behaviour>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</Behaviour>
<Attendance>
<SchoolGrade>3</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</Attendance>
<Enjoyment>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</Enjoyment>
<SafePractice>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</SafePractice>
<HealthyLifestyle>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</HealthyLifestyle>
< PositiveContribution
>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ PositiveContribution
>
<WorkplaceEconomic>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</WorkplaceEconomic>
</ JudgePersonalDevelop
ment>
< JudgeQualityOfProvis
ion>
<EffectiveFullRange>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</EffectiveFullRange>
< CurriculumNeedsInter
ests>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ CurriculumNeedsInter
ests>
<CareGuidance>
<SchoolGrade>1</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</CareGuidance>
</ JudgeQualityOfProvis
ion>
< JudgeLeadershipAndMa
nagement>
<RaisingSupporting>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</RaisingSupporting>
<DirectionQuality>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</DirectionQuality>
<MonitorReview>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</MonitorReview>
< EqualityDiscriminati
on>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ EqualityDiscriminati
on>
< EffectivenessEfficie
ncy>
<SchoolGrade>2</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ EffectivenessEfficie
ncy>
< GovernorsSupervision
>
<SchoolGrade>3</SchoolGrade>
<SixthFormGrade>9</SixthFormGrade>
</ GovernorsSupervision
>
<AdequacySuitability>
<SchoolYesNo>yes</SchoolYesNo>
<SixthFormYesNo>key stage not present</SixthFormYesNo>
</AdequacySuitability>
</ JudgeLeadershipAndMa
nagement>
<JudgeHealth>
<EatDrink>
<SchoolYesNo>yes</SchoolYesNo>
</EatDrink>
<Exercise>
<SchoolYesNo>yes</SchoolYesNo>
</Exercise>
<DiscourageAbuse>
<SchoolYesNo>yes</SchoolYesNo>
</DiscourageAbuse>
<SexualHealth>
<SchoolYesNo>yes</SchoolYesNo>
</SexualHealth>
</JudgeHealth>
<JudgeSafety>
< GovernmentRequiremen
ts>
<SchoolYesNo>yes</SchoolYesNo>
</ GovernmentRequiremen
ts>
<RiskAssessment>
<SchoolYesNo>yes</SchoolYesNo>
</RiskAssessment>
<ReduceAntiSocial>
<SchoolYesNo>yes</SchoolYesNo>
</ReduceAntiSocial>
<AvoidKeyRisks>
<SchoolYesNo>yes</SchoolYesNo>
</AvoidKeyRisks>
</JudgeSafety>
<JudgePositive>
<Relationships>
<SchoolYesNo>yes</SchoolYesNo>
</Relationships>
<DecisionParticipate>
<SchoolYesNo>yes</SchoolYesNo>
</DecisionParticipate>
<ActivityCommunity>
<SchoolYesNo>yes</SchoolYesNo>
</ActivityCommunity>
</JudgePositive>
<JudgeEconomic>
<BasicSkills>
<SchoolYesNo>yes</SchoolYesNo>
</BasicSkills>
<Enterprise>
<SchoolYesNo>yes</SchoolYesNo>
</Enterprise>
<CareersGuidance>
<SchoolYesNo>key stage not present</SchoolYesNo>
</CareersGuidance>
<EmploymentEconomy>
<SchoolYesNo>key stage not present</SchoolYesNo>
</EmploymentEconomy>
</JudgeEconomic>
<SpecialMeasures>
<SchoolYesNo>no</SchoolYesNo>
</SpecialMeasures>
<NoticeImprove>
<SchoolYesNo>no</SchoolYesNo>
</NoticeImprove>
</ InspectionJudgements
>
<LetterToPupils>
<Paragraph>Alexandra House</Paragraph>
<Paragraph>33 Kingsway</Paragraph>
<Paragraph>London </Paragraph>
<Paragraph>T 0207 </Paragraph>
<Paragraph>F 0207 </Paragraph>
<Paragraph>www.of.gov.uk</Paragraph>
<Paragraph> </Paragraph>
<Paragraph>West Street lt;/Paragraph>
<Paragraph>West Street</Paragraph>
<Paragraph>Colne</Paragraph>
<Paragraph>Lancashire</Paragraph>
<Paragraph>BB8 0HW</Paragraph>
<Paragraph>2 November 2005</Paragraph>
<Paragraph>Dear Children</Paragraph>
<Paragraph>Thank you for making Mr Onyon and myself so welcome when we
inspected your school recently. You were polite and friendly and very helpful
when we spoke to you in lessons and at lunchtime. You told us how well the
teachers look after you in school. We were impressed by how many of you take
part in the Cross Country Club.</Paragraph>
<Paragraph>We like the way the school council discusses your ideas and
then makes suggestions to Mr Peden. We know that you are now enjoying extra
play equipment because of this. We saw how well teachers planned interesting
lessons and how you work hard and learn well. </Paragraph>
<Paragraph>We have asked Mr Peden and your teachers to help you to do
even better by giving you more chances to write in lessons. We have also
asked the teachers to talk to you about your own targets so that you can
continue to work hard to improve your work.</Paragraph>
<Paragraph>Yours sincerely</Paragraph>
<Paragraph>Mrs Herring</Paragraph>
<Paragraph>Lead Inspector</Paragraph>
<Paragraph> Annex B</Paragraph>
</LetterToPupils>
</InspectionReport></TransformedXml>
<ImportedFileDetails>Filename: F:\margaret\2006 INSPECTIONS\AUTUMN
2005\FINAL REPORTS FOR PUBLISHING\P0099-4f-RP-To_OFSTED-West Street Community
Primary School-PUB11Nov05doc.doc
File date/time: 11 November 2005 15:49:38
Import date: 11 November 2005 15:54:26</ImportedFileDetails>
</InspectionReport>
</Inspection>
I only want the data from the transformedXML tag at the bottom, you can see
the fields referenced in the VB script
Function Main()
Dim objFSO
Dim objFolder
Dim objFilesColl
Dim iFilesCount
Dim objFile
Dim objXMLDOM
Dim objNodes
Dim objNodeItem
Dim objADORS
Dim objADOCnn
Dim strCurFileName
'Create and initialize (Open) ADO Connection
Set objADOCnn = CreateObject("ADODB.Connection")
objADOCnn.Open
" PROVIDER=SQLOLEDB;SE
RVER=Server;UID=UID;
PWD=password;DATABAS
E=Database;"
'Create MSXML 4.0 DOM Object and initialize it
Set objXMLDOM = CreateObject("MSXML2.DOMDocument.4.0")
objXMLDOM.async = False
objXMLDOM.validateOnParse = False
'Get a list of files in the specified directory
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO. GetFolder(strFilesPa
th)
Set objFilesColl = objFolder.Files
'Load each file in MSXML DOM and use ADO to insert data into the table
For Each objFile in objFilesColl
strCurFileName = strFilesPath & "\" & objFile.Name
'Load the XML file
'No error handling done
objXMLDOM.load strCurFileName
Set objNodes = objXMLDOM.selectNodes("/Ins")
'Create and Open the recordset
Set objADORS = CreateObject("ADODB.Recordset")
objADORS.Open "SELECT * FROM DataSet WHERE 1 = 2", objADOCnn,
adOpenKeyset, adLockOptimistic
'Add records
For Each objNodeItem In objNodes
With objADORS
..AddNew
..fields("InspectionType") =
objNodeItem.selectSingleNode("InspectionType").nodeTypedValue
..fields("InspectionNumber") =
objNodeItem.selectSingleNode("InspectionNumber").nodeTypedValue
..fields("InspectionName") =
objNodeItem.selectSingleNode("InsName").nodeTypedValue
..fields("Date") = objNodeItem.selectSingleNode("Date").nodeTypedValue
' .Update
End With
Next
objADORS.Close
'Message box for debugging purposes
'MsgBox "Copied data from " & strCurFileName & " into the database"
Next
objADOCnn.Close
Set objADORS = Nothing
Set objADOCnn = Nothing
Set objXMLDOM = Nothing
Set objFSO = Nothing
Main = DTSTaskExecResult_Su
ccess
End Function
There will be multiple files in one directory all with the same structure,
if anyone can help it would be much appreciated.
Thanks PD
|
|