本文介绍了ASP.NET中的XML配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
xml配置文件包含用于在网页上显示数据的SQL查询。数据库中有3个表。实现它的最佳方法是什么?
The xml configuration file is containing the SQL queries to be used to display the data on the web page.There are 3 tables in the DB. What is the best way of achieving it?
<?xml version="1.0" encoding="UTF-8"?>
-<grid table="Declaration">
<primary_key>DeclarationGUID</primary_key>
<query> SELECT DeclarationGUID, SequenceNum, AcceptanceDate, CommercialRefNum, DeclarantId, DeclarantPostalCode, DeclarantAddressLine1 + DeclarantAddressLine2 AS DeclarantAddress, DeclarantCity, DeclarantRegion, DeclarantCountry FROM Declaration </query>
-<grid table="GoodsItem">
<foreign_key>DeclarationGUID</foreign_key>
<primary_key>GoodsItemGUID</primary_key>
<query> SELECT DeclarationGUID, GoodsItemGUID, SequenceNum, CommodityCode, NetWeight, GrossWeight, DescriptionOfGoods FROM GoodsItem WHERE DeclarationGUID=@@DeclarationGUID@@ </query>
-<grid table="GoodsItemGUID">
<foreign_key>DeclarationGUID</foreign_key>
<foreign_key>GoodsItemGUID</foreign_key>
<primary_key>ContainerGUID</primary_key>
<query> SELECT DeclarationGUID, GoodsItemGUID, ContainerGUID, Identifier FROM GoodsItemContainer WHERE GoodsItemGUID=@@GoodsItemGUID@@ </query>
</grid>
</grid>
</grid>
推荐答案
这篇关于ASP.NET中的XML配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!