Greetings:
I am trying to use VBScript to insert an XML file into a MSSQL server database. is it possible at the transaction level to insert a child record of a child? For example, a transaction on t_parent, t_child, and t_company. I have been getting a error when i run my bulk load that says it doesn't recognize the parent/child relationship between t_child and t_company.
Any thoughts?

Thanks,
Brian

Here are my tables:
CREATE TABLE t_parent (
parent_id INTEGER PRIMARY KEY,
fname VARCHAR(50) NULL,
lname VARCHAR(50) NULL
)
GO

CREATE TABLE t_child (
parent_id INTEGER FOREIGN KEY REFERENCES t_parent(parent_id),
type VARCHAR(100) NULL,
pnumber VARCHAR(50) PRIMARY KEY
)
GO


CREATE TABLE t_company (
--parent_id INTEGER FOREIGN KEY REFERENCES t_parent(parent_id),
pnumber VARCHAR(50) FOREIGN KEY REFERENCES t_child(pnumber),
company_name VARCHAR(50) NULL
)
GO

Here is a snip of my XSD file:

<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="par_chi" parent="t_parent" parent-key="parent_id" child="t_child" child-key="parent_id" />
<sql:relationship name="chi_grand" parent="t_child" parent-key="pnumber" child="t_company" child-key="pnumber" />

</xsd:appinfo>
</xsd:annotation>

Thanks,

Brian