Wednesday, March 21, 2012

Posting to SQLXML

Hi,
I'm new to SQLXML and have run into a problem when using it
to update SQL tables from our application database.
We are generating XML in our application db and http
posting it to update an SQL database. The
(attribute-centric) XML generated matches the target table,
the element name is the same as the table name and the
attributes match the columns to be updated.
<ROOT>
<SUPPINV TABLE_KEY="10542049*202.12" INVOICE_TOTAL="377.56"
INVOICE_NUMBER="124577" INVOICE_DATE_KEY="12475">
<SUPPINV TABLE_KEY="123 ... >
</ROOT>
We have to URLEncode the XML then using HTTP post, we post
directly to the SQLXML URL from the application db.
This works as long as the size of posted data does not
exceed about 35kb and is not between 4 & 8Kb. This means I
have to chunk the XML into about 40 rows per post.
Also after posting about 100,000 rows (at 40 per time) or
so I generally get an HTTP 500 error.
Can anyone explain what is going on here and perhaps
suggest a way to improve this.
Regards,
StuartDid you limit the post size in SqlXml? What about the timeout in IIS?
Could be the request is just taking too long and timing out...
Irwin
"Stuart" <newplanet_x@.yahoo.com.au> wrote in message
news:1cf801c50fe8$3fea0da0$a601280a@.phx.gbl...
> Hi,
> I'm new to SQLXML and have run into a problem when using it
> to update SQL tables from our application database.
> We are generating XML in our application db and http
> posting it to update an SQL database. The
> (attribute-centric) XML generated matches the target table,
> the element name is the same as the table name and the
> attributes match the columns to be updated.
> <ROOT>
> <SUPPINV TABLE_KEY="10542049*202.12" INVOICE_TOTAL="377.56"
> INVOICE_NUMBER="124577" INVOICE_DATE_KEY="12475">
> <SUPPINV TABLE_KEY="123 ... >
> </ROOT>
> We have to URLEncode the XML then using HTTP post, we post
> directly to the SQLXML URL from the application db.
> This works as long as the size of posted data does not
> exceed about 35kb and is not between 4 & 8Kb. This means I
> have to chunk the XML into about 40 rows per post.
> Also after posting about 100,000 rows (at 40 per time) or
> so I generally get an HTTP 500 error.
> Can anyone explain what is going on here and perhaps
> suggest a way to improve this.
> Regards,
> Stuartsql

No comments:

Post a Comment