D
dev123
Hi
I have created a simple Infopath 2003 form and saved the data to sql server
2005 xml column in express edtion. It stored to IPForms table somthing like
this
-----------------------------------------------------------------------------------------
<?mso-infoPathSolution solutionVersion="1.0.0.11" productVersion="11.0.8165"
PIVersion="1.0.0.0" href="file:///C:\InfoPath_Work\SubmitXMLtoDB.xsn"
name="urn:schemas-microsoft-comffice:infopath:SubmitXMLtoDB:-myXSD-2007-11-28T19-48-30" ?>
<?mso-application progid="InfoPath.Document"?>
<?mso-infoPath-file-attachment-present?>
<my:TestFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-
11-28T19:48:30"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
xml:lang="en-
us">
<my:qryFields />
<myataFileds>
<my:id>2</my:id>
<my:EName>
<my:LName>LName</my:LName>
<my:FName>FName</my:FName>
<my:Image>/9j/4A</my:Image>
</my:EName>
<my:Gendar>1</my:Gendar>
<my:FColor>
<my:Red>false</my:Red>
<my:Blue>false</my:Blue>
<my:Green>true</my:Green>
</my:FColor>
<mytPicker>2008-01-31</mytPicker>
<my:txtBox>testtest</my:txtBox>
<my:txtrtf>rich text</my:txtrtf>
<my:File>x0lGQRQAAA</my:File>
</myataFileds>
</my:TestFields>
----------------------------------------------------------------
Now if I query the IPForms table like
SELECT Form.value('(/TestFields/DataFileds/@LName)[1]', 'varchar(50)' )
FROM IPForms
SELECT Form.query('(/TestFields/DataFileds/LName)')
FROM IPForms
I am getting NULL for the first and blank for the second query.
Can some body help me where I am going wrong?
Thank you
I have created a simple Infopath 2003 form and saved the data to sql server
2005 xml column in express edtion. It stored to IPForms table somthing like
this
-----------------------------------------------------------------------------------------
<?mso-infoPathSolution solutionVersion="1.0.0.11" productVersion="11.0.8165"
PIVersion="1.0.0.0" href="file:///C:\InfoPath_Work\SubmitXMLtoDB.xsn"
name="urn:schemas-microsoft-comffice:infopath:SubmitXMLtoDB:-myXSD-2007-11-28T19-48-30" ?>
<?mso-application progid="InfoPath.Document"?>
<?mso-infoPath-file-attachment-present?>
<my:TestFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-
11-28T19:48:30"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
xml:lang="en-
us">
<my:qryFields />
<myataFileds>
<my:id>2</my:id>
<my:EName>
<my:LName>LName</my:LName>
<my:FName>FName</my:FName>
<my:Image>/9j/4A</my:Image>
</my:EName>
<my:Gendar>1</my:Gendar>
<my:FColor>
<my:Red>false</my:Red>
<my:Blue>false</my:Blue>
<my:Green>true</my:Green>
</my:FColor>
<mytPicker>2008-01-31</mytPicker>
<my:txtBox>testtest</my:txtBox>
<my:txtrtf>rich text</my:txtrtf>
<my:File>x0lGQRQAAA</my:File>
</myataFileds>
</my:TestFields>
----------------------------------------------------------------
Now if I query the IPForms table like
SELECT Form.value('(/TestFields/DataFileds/@LName)[1]', 'varchar(50)' )
FROM IPForms
SELECT Form.query('(/TestFields/DataFileds/LName)')
FROM IPForms
I am getting NULL for the first and blank for the second query.
Can some body help me where I am going wrong?
Thank you